Histological assessment

ABSTRACT

A method of measuring oestrogen or progesterone receptor (ER or PR) comprises identifying in histopathological specimen image data pixel groups indicating cell nuclei, and deriving image hue and saturation. The image is thresholded using hue and saturation and preferentially stained cells identified. ER or PR status is determined from normalised average saturation and proportion of preferentially stained cells. A method of measuring C-erb-2 comprises correlating window functions with pixel sub-groups to identify cell boundaries, computing measures of cell boundary brightness and sharpness and brightness extent around cell boundaries, and comparing the measures with comparison images associated with different values of C-erb-2. A C-erb-2 value associated with a comparison image having similar brightness-related measures is assigned. A method of measuring vascularity comprises deriving image hue and saturation, producing a segmented image by hue and saturation thresholding and identifying contiguous pixels. Vascularity is determined from contiguous pixel area corresponding to vascularity expressed as a proportion of total image area.

[0001] This invention relates to a method, a computer program and anapparatus for histological assessment, and more particularly for makingmeasurements upon histological imagery to provide clinical informationon potentially cancerous tissue such as for example (but notexclusively) breast cancer tissue.

[0002] Breast cancer is a common form of female cancer: once a lesionindicative of breast cancer has been detected, tissue samples are takenand examined by a histopathologist to establish a diagnosis, prognosisand treatment plan. However, pathological analysis of tissue samples isa time consuming and inaccurate process. It entails interpretation ofcolour images by human eye, which is highly subjective: it ischaracterised by considerable inaccuracies in observations of the samesamples by different observers and even by the same observer atdifferent times. For example, two different observers assessing the sameten tissue samples may easily give different opinions for three of theslides −30% error. The problem is exacerbated by heterogeneity, i.e.complexity of some tissue sample features. Moreover, there is a shortageof pathology staff.

[0003] Oestrogen and progesterone receptor (ER and PR) status, C-erb-2and vascularity are parameters which are data of interest for assistinga clinician to formulate a diagnosis, prognosis and treatment plan for apatient. C-erb-2 is also known as Cerb-B2, her-2, her-2/neu and erb-2.

[0004] It is an object of the invention to provide a technique forobjective measurement of at least one of ER status, PR status, C-erb-2and vascularity.

[0005] In a first aspect, the present invention provides a method ofmeasuring oestrogen or progesterone receptor (ER or PR) status havingthe steps of:

[0006] a) obtaining histopathological specimen image data; and

[0007] b) identifying in the image data groups of contiguous pixelscorresponding to respective cell nuclei;

[0008] characterised in that the method also includes the steps of:

[0009] c) deriving hue and saturation for the image data in a colourspace having a hue coordinate and a saturation coordinate;

[0010] d) thresholding the image data on the basis of hue and saturationand identifying pixels corresponding to cells which are preferentiallystained relative to surrounding specimen tissue; and

[0011] e) determining ER or PR status from proportion of pixelscorresponding to preferentially stained cells.

[0012] The invention provides the advantage that it iscomputer-implementable, and hence is carried out in a way which avoidsthe subjectivity of a manual inspection process.

[0013] In an alternative first aspect, the invention may provide amethod of measuring ER or PR status having the steps of:

[0014] a) obtaining histopathological specimen image data; and

[0015] b) identifying in the image data groups of contiguous pixelscorresponding to respective cell nuclei;

[0016] characterised in that the method also includes the steps of:

[0017] c) deriving hue and saturation for the image data in a colourspace having a hue coordinate and a saturation coordinate;

[0018] d) thresholding the image data on the basis of hue and saturationand identifying pixels corresponding to cells which are preferentiallystained relative to surrounding specimen tissue; and

[0019] e) determining ER or PR status from normalised averagesaturation.

[0020] In a further alternative first aspect, the invention may providea method of measuring ER or PR status having the steps of:

[0021] a) obtaining histopathological specimen image data; and

[0022] b) identifying in the image data groups of contiguous pixelscorresponding to respective cell nuclei;

[0023] characterised in that the method also includes the steps of:

[0024] c) deriving hue and saturation for the image data in a colourspace having a hue coordinate and a saturation coordinate;

[0025] d) thresholding the image data on the basis of hue and saturationand identifying pixels corresponding to cells which are preferentiallystained relative to surrounding specimen tissue; and

[0026] e) determining ER or PR status from normalised average saturationand fraction of pixels corresponding to preferentially stained cells.

[0027] Step b) may implemented using a K-means clustering algorithmemploying a Mahalanobis distance metric.

[0028] Step c) may be implemented by transforming the image data into achromaticity space, and deriving hue and saturation from image pixelsand a reference colour. Hue may be obtained from an angle φ equal to$\sin^{- 1}\frac{{{\overset{\sim}{x}\quad y} - {x\quad \overset{\sim}{y}}}}{\sqrt{{\overset{\sim}{x}}^{2} + {\overset{\sim}{y}}^{2}}\sqrt{x^{2} + y^{2}}}$

[0029] and saturation from an expression$\frac{{x\quad \overset{\sim}{x}} + {y\quad \overset{\sim}{y}}}{{\overset{\sim}{x}}^{2} + {\overset{\sim}{y}}^{2}},$

[0030] where (x, y) and ({tilde over (x)}, {tilde over (y)}) arerespectively image pixel coordinates and reference colour coordinates inthe chromaticity space. It may be adapted to lie in the range 0 to 90degrees and a hue threshold of 80 degrees may be set in step d). Asaturation threshold S_(o) may be set in step d), S_(o) being 0.9 forsaturation in the range 0.1 to 1.9 and 0 for saturation outside thisrange.

[0031] The fraction of pixels corresponding to preferentially stainedcells may be determined by counting the number of pixels having bothsaturation greater than a saturation threshold and hue modulus less thana hue threshold and expressing such number as a fraction of a totalnumber of pixels in the image: it may be awarded a score 0, 1, 2, 3, 4or 5 according respectively to whether it is (i) 0, (ii) >0 and <0.01,(iii) ≧0.01 and ≦0.10, (iv) ≧0.11 and ≦0.33, (v) ≧0.34 and ≦0.66 or (vi)≧0.67 and ≦1.0.

[0032] Normalised average saturation may be accorded a score 0, 1, 2 or3 according respectively to whether it is (i) ≦25%, (ii) >25% and ≦50%,(iii) >50% and ≦75% or (iv) >75% and ≦100%.

[0033] Scores for normalised average saturation and fraction of pixelscorresponding to preferentially stained cells may be added together toprovide a measurement of ER or PR.

[0034] The method of the invention may include measuring C-erb-2 statusby the following steps:

[0035] a) correlating window functions of different lengths with pixelsub-groups within the identified contiguous pixels groups to identifypixels associated with cell boundaries,

[0036] b) computing brightness-related measures of cell boundarybrightness and sharpness and brightness extent around cell boundariesfrom pixels corresponding to cell boundaries,

[0037] c) comparing the brightness-related measures with predeterminedequivalents obtained from comparison images associated with differentvalues of C-erb-2, and

[0038] d) assigning to the image data a C-erb-2 value which is thatassociated with the comparison image having brightness-related measuresclosest to those determined for the image data.

[0039] The method of the invention may include measuring vascularity bythe following steps:

[0040] a) deriving hue and saturation for the image data in a colourspace having a hue coordinate and a saturation coordinate;

[0041] b) producing a segmented image by thresholding the image data onthe basis of hue and saturation;

[0042] c) identifying in the segmented image groups of contiguouspixels; and

[0043] d) determining vascularity from the total area of the groups ofcontiguous pixels which are sufficiently large to correspond tovascularity, such area being expressed as a proportion of the imagedata's total area.

[0044] In a second aspect, the invention provides a method of measuringC-erb-2 status having the steps of:

[0045] a) obtaining histopathological specimen image data; and

[0046] b) identifying in the image data contiguous pixel groupscorresponding to respective cell nuclei associated with surrounding cellboundary staining;

[0047] c) characterised in that the method also includes the steps of:

[0048] d) correlating window functions of different lengths with pixelsub-groups within the identified contiguous pixels groups to identifypixels associated with cell boundaries,

[0049] e) computing brightness-related measures of cell boundarybrightness and sharpness and brightness extent around cell boundariesfrom pixels corresponding to cell boundaries,

[0050] f) comparing the brightness-related measures with predeterminedequivalents obtained from comparison images associated with differentvalues of C-erb-2, and

[0051] g) assigning to the image data a C-erb-2 value which is thatassociated with the comparison image having brightness-related measuresclosest to those determined for the image data.

[0052] In this aspect, at least some of the window functions may havenon-zero values of 6, 12, 24 and 48 pixels respectively and zero valueselsewhere. Pixels associated with a cell boundary are identified from amaximum correlation with a window function, the window function having alength which provides an estimate of cell boundary width.

[0053] The brightness-related measure of cell boundary brightness andsharpness may be computed in step d) using a calculation includingdividing cell boundaries by their respective widths to providenormalised boundary magnitudes, selecting a fraction of the normalisedboundary magnitudes each greater than unselected equivalents and summingthe normalised boundary magnitudes of the selected fraction.

[0054] In step d) a brightness-related measure of brightness extentaround cell boundaries may be computed using a calculation includingdividing normalised boundary magnitudes into different magnitude groupseach associated with a respective range of magnitudes, providing arespective magnitude sum of normalised boundary magnitudes for eachmagnitude group, and subtracting a smaller magnitude sum from a largermagnitude sum.

[0055] The comparison image having brightness-related measures closestto those determined for the image data may be determined from aEuclidean distance between the brightness-related measures of thecomparison image and the image data.

[0056] In step b) identifying in the image data contiguous pixel groupscorresponding to respective cell nuclei is carried out by an adaptivethresholding technique arranged to maximise the number of contiguouspixel groups identified. For image data including red, green and blueimage planes the adaptive thresholding technique may include:

[0057] a) generating a mean value μ_(R) and a standard deviation σ_(R)for pixels in the red image plane,

[0058] b) generating a cyan image plane from the image data andcalculating a mean value μ_(C) for its pixels,

[0059] c) calculating a product CMMμ_(C) where CMM is a predeterminedmultiplier,

[0060] d) calculating a quantity R_(B) equal to the number of adjacentlinear groups of pixels of predetermined length and including at leastone cyan pixel which is less than CMMμ_(C),

[0061] e) for each red pixel calculating a threshold equal to{RMMμ_(R)−σ_(R)(4−R_(B))} and RMM is a predetermined multiplier,

[0062] f) forming a thresholded red image by discarding each red pixelthat is greater than or equal to the threshold,

[0063] g) determining the number of contiguous pixel groups in thethresholded red image,

[0064] h) changing the values of RMM and CMM and iterating steps c) tog),

[0065] i) changing the values of RMM and CMM once more and iteratingsteps c) to g),

[0066] j) comparing the numbers of contiguous pixel groups determined insteps g) to i), treating the three pairs of values of RMM and CMM aspoints in a two dimensional space, selecting the pair of values of RMMand CMM associated with the lowest number of contiguous pixel groups,obtaining its reflection in the line joining the other two pairs ofvalues of RMM and CMM, using this reflection as a new pair of values ofRMM and CMM and iterating steps c) to g) and this step j).

[0067] The first three pairs of RMM and CMM values may be 0.802 and1.24, 0.903 and 0.903, and 1.24 and 0.802 respectively.

[0068] Brown pixels may be removed from the thresholded red image iflike-located pixels in the cyan image are less than CMMμ_(C); edgepixels may be removed likewise if like-located pixels in aSobel-filtered cyan image having a standard deviation σ_(C) are greaterthan (μ_(C)+1.5σ_(C)). Pixels corresponding to lipids may also beremoved if their red green and blue pixel values are all greater thanthe sum of the relevant colour's minimum value and 98% of its range ofpixel values in each case.

[0069] The thresholded red image may be subjected to a morphologicalclosing operation.

[0070] In a third aspect, the present invention provides a method ofmeasuring vascularity having the steps of:

[0071] a) obtaining histopathological specimen image data; characterisedin that the method also includes the steps of:

[0072] b) deriving hue and saturation for the image data in a colourspace having a hue coordinate and a saturation coordinate;

[0073] c) producing a segmented image by thresholding the image data onthe basis of hue and saturation; and

[0074] d) identifying in the segmented image groups of contiguouspixels; and

[0075] e) determining vascularity from the total area of the groups ofcontiguous pixels which are sufficiently large to correspond tovascularity, such area being expressed as a proportion of the imagedata's total area.

[0076] In this aspect the image data may comprise pixels with red, greenand blue values designated R, G and B respectively, characterised inthat a respective saturation value S is derived in step b) for eachpixel by:

[0077] a) defining M and m for each pixel as respectively the maximumand minimum of R, G and B; and

[0078] b) setting S to zero if m equals zero and setting S to (M−m)/Motherwise.

[0079] Hue values designated H may be derived by:

[0080] a) defining new values newr, newg and newb for each pixel givenby newr=(M−R)/(M−m), newg=(M−G)/(M−m) and newb=(M−B)/(M−m) in order toconvert each pixel value into the difference between its magnitude andthat of the maximum of the three colour magnitudes of that pixel, thisdifference being divided by the difference between the maximum andminimum of R, G and B, and

[0081] b) calculating H as tabulated immediately below: M H 0 180 R60(newb − newg)* G 60(2 + newr − newb)* B 60(4 + newg − newr)*

[0082] provided that if H proves to be >360, then 360 is subtracted fromit, and if H proves to be <0, 360 is added to it.

[0083] The step of producing a segmented image may be implemented bydesignating for further processing only those pixels having both a hue Hin the range 282-356 and a saturation S in the range 0.2 to 0.24. Thestep of identifying in the segmented image groups of contiguous pixelsmay include the step of spatially filtering such groups to remove groupshaving insufficient pixels to contribute to vascularity. The step ofdetermining vascularity may include treating vascularity as having ahigh or a low value according to whether or not it is at least 31%.

[0084] In a fourth aspect, the present invention provides a computerprogram for measuring ER or PR status, the program being arranged tocontrol computer apparatus to execute the steps of:

[0085] a) processing histopathological specimen image data to identifyin the image data groups of contiguous pixels corresponding torespective cell nuclei;

[0086] characterised in that the program is also arranged to implementthe steps of:

[0087] b) deriving hue and saturation for the image data in a colourspace having a hue coordinate and a saturation coordinate;

[0088] c) thresholding the image data on the basis of hue and saturationand identifying pixels corresponding to cells which are preferentiallystained relative to surrounding specimen tissue; and

[0089] d) determining ER or PR status from proportion of pixelscorresponding to preferentially stained cells.

[0090] In an alternative fourth aspect, the present invention provides acomputer program for measuring ER or PR status, the program beingarranged to control computer apparatus to execute the steps of:

[0091] a) processing histopathological specimen image data to identifyin the image data groups of contiguous pixels corresponding torespective cell nuclei;

[0092] b) characterised in that the program is also arranged toimplement the steps of:

[0093] c) deriving hue and saturation for the image data in a colourspace having a hue coordinate and a saturation coordinate;

[0094] d) thresholding the image data on the basis of hue and saturationand identifying pixels corresponding to cells which are preferentiallystained relative to surrounding specimen tissue; and

[0095] e) determining ER or PR status from normalised averagesaturation.

[0096] In a further alternative fourth aspect, the present inventionprovides a computer program for measuring ER or PR status, the programbeing arranged to control computer apparatus to execute the steps of:

[0097] a) processing histopathological specimen image data to identifyin the image data groups of contiguous pixels corresponding torespective cell nuclei;

[0098] characterised in that the program is also arranged to implementthe steps of:

[0099] b) deriving hue and saturation for the image data in a colourspace having a hue coordinate and a saturation coordinate;

[0100] c) thresholding the image data on the basis of hue and saturationand identifying pixels corresponding to cells which are preferentiallystained relative to surrounding specimen tissue; and

[0101] d) determining ER or PR status from normalised average saturationand fraction of pixels corresponding to preferentially stained cells.

[0102] In a fifth aspect, the present invention provides a computerprogram for use in measuring C-erb-2 status arranged to control computerapparatus to execute the steps of:

[0103] a) processing histopathological specimen image data to identifycontiguous pixel groups corresponding to respective cell nucleiassociated with surrounding cell boundary staining;

[0104] characterised in that the computer program is also arranged toimplement the steps of:

[0105] b) correlating window functions of different lengths with pixelsub-groups within the identified contiguous pixels groups to identifypixels associated with cell boundaries,

[0106] c) computing brightness-related measures of cell boundarybrightness and sharpness and brightness extent around cell boundariesfrom pixels corresponding to cell boundaries,

[0107] d) comparing the brightness-related measures with predeterminedequivalents obtained from comparison images associated with differentvalues of C-erb-2, and

[0108] e) assigning to the image data a C-erb-2 value which is thatassociated with the comparison image having brightness-related measuresclosest to those determined for the image data.

[0109] In a sixth aspect, the present invention provides a computerprogram for use in measuring vascularity arranged to control computerapparatus to execute the steps of:

[0110] a) using histopathological specimen image data to derive hue andsaturation for the image data in a colour space having a hue coordinateand a saturation coordinate;

[0111] b) producing a segmented image by thresholding the image data onthe basis of hue and saturation; and

[0112] c) identifying in the segmented image groups of contiguouspixels; and

[0113] f) determining vascularity from the total area of the groups ofcontiguous pixels which are sufficiently large to correspond tovascularity, such area being expressed as a proportion of the imagedata's total area.

[0114] In a seventh aspect, the present invention provides an apparatusfor measuring ER or PR status including means for photographinghistopathological specimens to provide image data and computer apparatusto process the image data, the computer apparatus being programmed toidentify in the image data groups of contiguous pixels corresponding torespective cell nuclei, characterised in that the computer apparatus isalso programmed to execute the steps of:

[0115] a) deriving hue and saturation for the image data in a colourspace having a hue coordinate and a saturation coordinate;

[0116] b) thresholding the image data on the basis of hue and saturationand identifying pixels corresponding to cells which are preferentiallystained relative to surrounding specimen tissue; and

[0117] c) determining ER or PR status from proportion of pixelscorresponding to preferentially stained cells.

[0118] In an alternative seventh aspect, the present invention providesan apparatus for measuring ER or PR status including means forphotographing histopathological specimens to provide image data andcomputer apparatus to process the image data, the computer apparatusbeing programmed to identify in the image data groups of contiguouspixels corresponding to respective cell nuclei, characterised in thatthe computer apparatus is also programmed to execute the steps of:

[0119] a) deriving hue and saturation for the image data in a colourspace having a hue coordinate and a saturation coordinate;

[0120] b) thresholding the image data on the basis of hue and saturationand identifying pixels corresponding to cells which are preferentiallystained relative to surrounding specimen tissue; and

[0121] c) determining ER or PR status from normalised averagesaturation.

[0122] In a further alternative seventh aspect, the present inventionprovides an apparatus for measuring ER or PR status including means forphotographing histopathological specimens to provide image data andcomputer apparatus to process the image data, the computer apparatusbeing programmed to identify in the image data groups of contiguouspixels corresponding to respective cell nuclei, characterised in thatthe computer apparatus is also programmed to execute the steps of:

[0123] a) deriving hue and saturation for the image data in a colourspace having a hue coordinate and a saturation coordinate;

[0124] b) thresholding the image data on the basis of hue and saturationand identifying pixels corresponding to cells which are preferentiallystained relative to surrounding specimen tissue; and

[0125] c) determining ER or PR status from normalised average saturationand fraction of pixels corresponding to preferentially stained cells.

[0126] In an eighth aspect, the present invention provides an apparatusfor measuring C-erb-2 status including means for photographinghistopathological specimens to provide image data and computer apparatusto process the image data, the computer apparatus being programmed toidentify in the image data groups of contiguous pixels corresponding torespective cell nuclei, characterised in that the computer apparatus isalso programmed to execute the steps of:

[0127] a) correlating window functions of different lengths with pixelsub-groups within the identified contiguous pixels groups to identifypixels associated with cell boundaries,

[0128] b) computing brightness-related measures of cell boundarybrightness and sharpness and brightness extent around cell boundariesfrom pixels corresponding to cell boundaries,

[0129] c) comparing the brightness-related measures with predeterminedequivalents obtained from comparison images associated with differentvalues of C-erb-2, and

[0130] d) assigning to the image data a C-erb-2 value which is thatassociated with the comparison image having brightness-related measuresclosest to those determined for the image data.

[0131] In a ninth aspect, the present invention provides an apparatusfor measuring vascularity including means for photographinghistopathological specimens to provide image data and computer apparatusto process the image data, characterised in that the computer apparatusis also programmed to execute the steps of:

[0132] a) deriving hue and saturation for the image data in a colourspace having a hue coordinate and a saturation coordinate;

[0133] b) producing a segmented image by thresholding the image data onthe basis of hue and saturation; and

[0134] c) identifying in the segmented image groups of contiguouspixels; and

[0135] d) determining vascularity from the total area of the groups ofcontiguous pixels which are sufficiently large to correspond tovascularity, such area being expressed as a proportion of the imagedata's total area.

[0136] The computer program and apparatus aspects of the invention mayhave preferred features corresponding to those of respective methodaspects.

[0137] In order that the invention might be more fully understood,embodiments thereof will now be described, by way of example only, withreference to the accompanying drawings, in which:—

[0138]FIG. 1 is a block diagram of a procedure for measuring indicationsof cancer to assist in formulating diagnosis and treatment;

[0139]FIG. 2 is a block diagram of a process for measuring ER and PRreceptor status in the procedure of FIG. 1;

[0140]FIG. 3 is a pseudo three dimensional view of a red, green and bluecolour space (colour cube) plotted on respective orthogonal axes;

[0141]FIG. 4 is a transformation of FIG. 3 to form a chromaticity space;

[0142]FIG. 5 is a drawing of a chromaticity space reference system;

[0143]FIG. 6 illustrates use of polar co-ordinates;

[0144]FIG. 7 is a block diagram of a process for measuring C-erb-2 inthe procedure of FIG. 1; and

[0145]FIG. 8 is a block diagram of a process for measuring vascularityin the procedure of FIG. 1.

[0146] The examples to be described herein are three differentinventions which can be implemented separately or together, because theyare all measurements which individually or collectively assist aclinician to diagnose cancer and to formulate a treatment programme. Indescending order of importance, the procedures are determination ofoestrogen and progesterone receptor status, determination of C-erb-2 anddetermination of vascularity.

[0147] A procedure 10 for the assessment of tissue samples in the formof histopathological slides of potential carcinomas of the breast isshown in FIG. 1. This drawing illustrates processes which generatemeasurements of specialised kinds for use by a pathologist as the basisfor assessing patient diagnosis, prognosis and treatment plan.

[0148] The procedure 10 employs a database which maintains digitisedimage data obtained from histological slides as will be described later.Sections are taken (cut) from breast tissue samples (biopsies) andplaced on respective slides. Slides are stained using a staining agentselected from the following depending on which parameter is to bedetermined:

[0149] a) Immunohistochemical staining for C-erb-2 with diaminobenzidine(DAB) as substrate (chemical staining agent)—collectively“Cerb-DAB”—this is for assessing C-erb-2 gene amplification status;

[0150] b) Oestrogen receptor (ER) with DAB as substrate (collectively“ER-DAB”) for assessing the expression (the amount expressed or emitted)of the oestrogen receptors. Progesterone receptor (PR) status isinvestigated using chemical treatment giving the same colouration as inER.

[0151] c) Immunohistochemical staining for CD31 with fuchsin (F) assubstrate for assessing vascularity (angiogenesis).

[0152] In a prior art manual procedure, a clinician places a slide undera microscope and examines a region of it (referred to as a tile) atmagnification of ×40 for indications of C-erb-2, ER and PR status and at×20 for vascularity.

[0153] The present invention requires data from histological slides in asuitable form. In the present example, image data were obtained by apathologist using Zeiss Axioskop microscope with a Jenoptiks Progres3012 digital camera. Image data from each slide is a set of digitalimages obtained at a linear magnification of 40 (i.e. 40×), each imagebeing an electronic equivalent of a tile.

[0154] To select images, a pathologist scans the microscope over aslide, and at 40× magnification selects regions (tiles) of the slidewhich appear to be most promising in terms of an analysis to beperformed. Each of these regions is then photographed using themicroscope and digital camera referred to above, which produces for eachregion a respective digitised image in three colours, i.e. red, greenand blue (R, G & B). Three intensity values are obtained for each pixelin a pixel array to provide an image as a combination of R, G and Bimage planes. This image data is stored temporarily at 12 for later use.

[0155] Three tiles are required for vascularity measurement at 14, andone tile for each of oestrogen and progesterone receptor measurement at16 and C-erb-2 measurement at 18. These measurements provide input to adiagnostic report at 20.

[0156] The prior art manual procedure for scoring C-erb-2 involves apathologist subjectively and separately estimating stain intensity,stain location and relative number of cells associated with a feature ofinterest in a tissue sample. The values obtained in this way arecombined by a pathologist to give a single measurement for use indiagnosis, prognosis and reaching a decision on treatment. The processhereinafter described in this example replaces the prior art manualprocedure with an objective procedure.

[0157] Referring now to FIG. 2, processing 16 to determine ER statuswill be outlined and then described in more detail later. It begins witha pre-processing stage 30 in which a K-means clustering algorithm isapplied to a colour image using a Mahalanobis metric. This determines orcues image regions of interest for further processing by associatingpixels into clusters on the basis of their having similar values of theMahalanobis metric. At 32 the colour image is transformed into achromaticity space which includes a location of a reference colour. Hueand saturation are calculated at 34 for pixels in clusters cued byK-means clustering. The number of brown stained pixels is computed at 36by thresholding on the basis of hue and saturation. An ER statusmeasurement is then derived at 38 from a combination of the fraction ofstained pixels and average colour saturation.

[0158] The input for the ER preprocessing stage 30 consists of rawdigital data files of a single histopathological colour image or tile. Atriplet of image band values for each pixel represents the colour ofthat pixel in its red, green, and blue spectral components or imagebands. These values in each of the three image bands are in the range [0. . . 255], where [0,0,0] corresponds to black and [255,255,255]corresponds to white. The K-means clustering algorithm 30 is applied tothe digital colour image using clusters and the Mahalanobis distancemetric. A cluster is a natural grouping of data having similar values ofthe relevant metric, and the Mahalanobis distance metric is ameasurement that gives an indication of degree of closeness of dataitems to a cluster centre. It is necessary to have some means forlocating cell nuclei as pixel groups but it is not essential to use fourclusters or the Mahalanobis distance metric: these have been found towork well in identifying groups of contiguous pixels which correspond torespective cell nuclei. The K-means algorithm is described by J. A.Hartigan and M. A. Wong, in a paper entitled ‘A K-means clusteringalgorithm’, Algorithm AS 136, Applied Statistics Journal, 1979. TheMahalanobis distance metric is described by F. Heijden, in ‘Image BasedMeasurement Systems—object recognition and parameter estimation’, JohnWiley & Sons, 1994 and by R. Schalkoff, in ‘PatternRecognition—Statistical, Structural and Neural approaches’, John Wiley &Sons Inc., 1992. The process comprises an initialisation step a)followed by computation of a covariance matrix at step b). This leads toa likelihood calculation at step c), which effectively provides thedistance of a pixel from a cluster centre. The procedure is as follows:

[0159] a) Initially, cluster centres are set using 30+(cluster number+1)×10 subtracted from the mean of the red, green and blue image bandsrespectively. For example the first cluster values would be set atmean_red −30+(0 +1)×10 (hence mean_red −20), similarly for mean_greenand mean_blue. The second cluster would be mean_red −10, mean_green −10,and mean_blue −10, and similarly for other clusters. Pixels are thenassigned to clusters for later readjustment.

[0160] b) For each cluster the following computations are carried out:

[0161] i) Compute elements of the kind σ_(ij) ^(k) of a covariancematrix of the image bands indicating the degree of variation betweenintensities of different colours in pixels of each cluster from Equation(1): $\begin{matrix}{\sigma_{i\quad j}^{k} = {\frac{1}{N^{k}}{\sum\limits_{l = 1}^{N^{k}}\quad {\left( {c_{li} - \mu_{i}^{k}} \right)\left( {c_{lj} - \mu_{j}^{k}} \right)}}}} & (1)\end{matrix}$

[0162] where:

[0163] σ_(ij) ^(k) is the ij^(th) element of the covariance matrix,

[0164] N_(k) is the number of pixels in cluster k,

[0165] C_(li), and C_(lj), are the values of pixel l in image bands iand j,

[0166] i, j take values 1, 2, 3, which represent the red, green and blueimage bands respectively,

[0167] μ_(i) ^(k) is the mean of all pixels in image band i belonging tocluster k, and

[0168] μ_(j) ^(k) is the mean of all pixels in image band j belonging tocluster k.

[0169] ii) Calculate the determinant of the covariance matrix denoted as$\sum\limits_{d\quad {et}}^{k}\quad$

[0170] iii) Calculate the inverse of the covariance matrix denoted as E${\sum\limits_{i\quad {nv}}^{k}.}\quad$

[0171] c). With index i denoting pixel number, each pixel {right arrowover (x)}_(i) is now treated as a vector having three elements x_(i,1),x_(i,2), x_(i,3) which are the red (x_(i,1)), green (x_(i,2)) and blue(x_(i,3)) pixel values: the red, green and blue image bands aretherefore represented by second subscript indices 1, 2 and 3respectively. With i ranging over all pixels in a cluster k, thelikelihood d^(k)({right arrow over (x)}_(i)) of a pixel vector {rightarrow over (x)}_(i) not belonging to that cluster is computed fromEquation (2) below: $\begin{matrix}{{d^{k}\left( {\overset{\rightarrow}{x}}_{i} \right)} = {{\ln \left( \sqrt{\sum\limits_{d\quad {et}}^{k}} \right)} + {1/{2\left\lbrack {\left( {{\overset{\rightarrow}{x}}_{i} - {\overset{\rightarrow}{\mu}}^{k}} \right)^{t}{\sum\limits_{i\quad {nv}}^{k}\left( {{\overset{\rightarrow}{x}}_{i} - {\overset{\rightarrow}{\mu}}^{k}} \right)}} \right\rbrack}}}} & (2)\end{matrix}$

[0172] where$\sum\limits_{d\quad {et}}^{k}\quad {{and}\quad \sum\limits_{i\quad {nv}}^{k}}$

[0173] are as defined above,

[0174] μ_(i) ^(k) is the mean of all pixel vectors {right arrow over(x)}_(i) in cluster k, and

[0175] t indicates the transpose of the difference vector ({right arrowover (x)}_(i)−{right arrow over (μ)}^(k)).

[0176] Equation (2) is re-evaluated for the same pixel vector {rightarrow over (x)}_(i) in all other clusters also. Pixel vector {rightarrow over (x)}₁ has the highest likelihood of belonging to a cluster(denoted k_(m)) for which d^(k)({right arrow over (x)}_(i))has a minimumvalue i.e. {d^(k) ^(_(m)) ({right arrow over (x)}_(i))}; cluster k_(m)is then the most suitable to receive pixel {right arrow over (x)}_(i);i.e. find:—

d^(k) ^(_(m)) ({right arrow over (x)}_(i))≦d^(k ({right arrow over (x)})_(i)) for all k≠k_(m)  (3)

[0177] Assign pixel {right arrow over (x)}_(i)to cluster k_(m)

[0178] d). For each cluster k:

[0179] Store a record of which pixels belong to cluster k as an arrayX^(k), update it with each pixel vector assigned to that cluster andupdate the number N^(k) of pixels in that cluster.

[0180] Calculate the cluster centre μ_(j) ^(k) for each image band j=1,2 and 3 from: $\begin{matrix}{\mu_{j}^{k} = {\frac{1}{N^{k}}{\sum\limits_{i = 1}^{N^{k}}x_{i}^{k}}}} & (4)\end{matrix}$

[0181] Iterate steps b) to d) until convergence, i.e. when no morepixels change clusters or the number of iterations reaches a total of20.

[0182] The first cluster (k=1) now corresponds to cell nuclei and thecorresponding pixel vectors are those which are cued as of interest foroutput and further processing.

[0183] Transformation of the image at 32 from red/green/blue (RGB) tochromaticity space. In the present example, as will be described, areference colour is used: if necessary, this can be avoided using e.g.the approach of the Cerb B2 example described later. The chemicalstaining used in the present example results in brown colouration andthe approach used here is arranged to detect that preferentially; adifferent staining could however be used, in which case the techniquewould be adapted to detect a different pixel colour.

[0184] In practice brightness is liable to vary due to variation indegree of chemical staining and sample thickness across a slide, as wellas possible vignetting by a camera lens used to produce the images. Inconsequence in this example emphasis is placed on computing ameasurement of hue (or colour) and saturation as described later.

[0185] (a) Referring now also to FIGS. 3 to 6, each RGB image istransformed into a chromaticity space. FIG. 3 shows an RGB cube 40 inwhich red, green and blue pixel values (expressed as R, G and Brespectively) are normalised and represented as values in the range 0to 1. These pixel values are represented on red, green and blue axes 52,54 and 56 respectively. The chromaticity space is a plane 58 for whichR+G+B=1: it is triangular within the RGB cube 50 and passes through thepoints (1,0,0), (0,1,0) and (0,0,1).

[0186] (b) FIG. 4 shows the axes 52, 54 and 56 and chromaticity space 58looking broadly speaking along a diagonal of the RGB cube 50 from thepoint (1,1,1) (not shown) to the origin (0,0,0) now referenced O forconvenience. The points (0,0,1), (0,1,0) and (1,0,0) in FIG. 3 are nowreferenced J, K and L respectively. D is a midpoint of a straight linebetween J and L. Image pixel values from the input RGB image areprojected on to the chromaticity space 108 and the resulting projectionsbecome data points for further processing.

[0187] The projection calculation is as follows:

[0188] Red green and blue pixel chromaticity values r, g and brespectively are defined as:— $\begin{matrix}{{r = \frac{R}{R + G + B}},{g = \frac{G}{R + G + B}},{{{and}\quad b} = \frac{B}{R + G + B}}} & (5)\end{matrix}$

[0189] Perpendiculars from a point P in the chromaticity space 108 tothe lines JK and LD meet the latter at E and G respectively.Perpendiculars from P and G to the plane JOK meet the latter at F and Hrespectively. Using Equations (5), the point P in the triangularchromaticity space 58 may then be defined by x and y co-ordinates shownin FIG. 4 and given by: $\begin{matrix}{x = {{DE} = {{HF} = {{\frac{g - r}{\sqrt{2}}\quad {and}\quad y} = {{PE} = {{GD} = {b\sqrt{\frac{3}{2}}}}}}}}} & (6)\end{matrix}$

[0190] (c) In FIG. 5, the chromaticity space 58 is shown with x and yco-ordinate axes extending from an origin Q. A reference colour denotedby a point S in the drawing is now defined as that specified for thispurpose by a clinician: it is the colour of that part of the image whichis most positively stained (the most intense colour on the part of theoriginal slide from which the image was taken). The reference colour'sRGB components are taken from the image and its x and y co-ordinates arecomputed using Equations (5) and (6): these co-ordinates are denoted as({tilde over (x)}, {tilde over (y)}).

[0191] (d) In FIG. 6, a polar co-ordinate system (r,θ) is now defined onthe (R+G+B=1) plane or chromaticity space 58. The co-ordinate systemorigin is the centre of gravity G of the triangle 58. A referencedirection for θ=0 is defined as the direction QS of the radius vector tothe reference colour S in FIG. 5. For any point such as P on thetriangle defined as having co-ordinates (x, y) in the HSV colour space,hue H is defined as the angle φ between the radius vector (e.g. QP) toitself and the radius vector QS to the reference colour. This iscomputed at 34 from the following expressions for φ: $\begin{matrix}{{\sin \quad \varphi} = \frac{{\overset{\sim}{x}y} - {x\overset{\sim}{y}}}{\sqrt{{\overset{\sim}{x}}^{2} + {\overset{\sim}{y}}^{2}}\sqrt{x^{2} + y^{2}}}} & (7) \\{{\cos \quad \varphi} = \frac{{x\overset{\sim}{x}} + {y\overset{\sim}{y}}}{\sqrt{{\overset{\sim}{x}}^{2} + {\overset{\sim}{y}}^{2}}\sqrt{x^{2} + y^{2}}}} & (8)\end{matrix}$

[0192]  and the angle φ is defined to be $\begin{matrix}{\sin^{- 1}\frac{\left| {{\overset{\sim}{x}y} - {x\overset{\sim}{y}}} \right|}{\sqrt{{\overset{\sim}{x}}^{2} + {\overset{\sim}{y}}^{2}}\sqrt{x^{2} + y^{2}}}} & (9)\end{matrix}$

[0193] For convenience the definition of hue H is now altered somewhatto render all values positive and in the range 0 to π/2: thetransformation of earlier values φ into a new version ψ is shown inTable 1 below: TABLE 1 Condition Magnitude of ψ (New Hue H) sin φ > 0and cos φ > 0 φ sin φ > 0 and cos φ < 0 π − φ sin φ < 0 and cos φ > 0 −φ sin φ < 0 and cos φ < 0 φ − π

[0194] A hue (H) threshold ψ₀ is set at 36 by a user or programmer ofthe procedure as being not more than π/2, a typical value which might bechosen being 80 degrees. Saturation S is defined to be $\begin{matrix}{{saturation} = \frac{{x\overset{\sim}{x}} + {y\overset{\sim}{y}}}{{\overset{\sim}{x}}^{2} + {\overset{\sim}{y}}^{2}}} & (10)\end{matrix}$

[0195] Two values of saturation threshold S₀ are set according towhether or not image pixel saturation value S lies in the range 0.1 to1.9: this is set out in Table 2 below: TABLE 2 Saturation S S₀ Either S< 0.1 or S > 1.9 0 0.1 ≦ S ≦ 1.9 0.9

[0196] At 36, the thresholds are used to count selectively the numberN_(b) of pixels which are sufficiently brown (having a large enoughvalue of saturation) having regard to the reference colour. All H and Spixel values in the image are assessed. The conditions to be satisfiedby a pixel's hue and saturation values for it to be counted in the brownpixel number N_(b) are set out in Table 3 below. TABLE 3 ConditionAction For each pixel with both hue modulus Treat as a “saturated”pixel; |ψ| < ψ₀ and saturation S > S₀ increase count N_(b) of brownpixels by 1 For each pixel with |ψ| ≧ ψ₀ and/or Treat as an“unsaturated” saturation S ≦ S₀ pixel; leave N_(b) unchanged

[0197] The average saturation of the N_(b) saturated pixels determinedin Table 3 is computed by adding all their saturation values S togetherand dividing the resulting sum by N_(b). The maximum saturation value ofthe saturated pixels is then determined, and the average saturation isnormalised by expressing it as a percentage of this maximum: thisapproach is used to counteract errors due to variation in colourstaining between different images. The normalised average saturation isthen accorded a score at 38 of 0, 1, 2 or 3 according respectively towhether this percentage is (a) ≦25%, (b) >25% and ≦50%, (c) >50% and≦75% or (d) >75% and ≦100%.

[0198] The fraction of saturated pixels—those corresponding to cellsstained sufficiently brown relative to surrounding tissue—is computed at38 from the ratio N_(b)/N where N is the total number of pixels in theimage. This fraction is then quantised to a score in the range 0 to 5 asset out in Table 5 below. TABLE 5 N_(b)/N:Fraction of image pixels thatare stained Score   0.00 0 <0.01 1 0.01-0.10 2 0.11-0.33 3 0.34-0.66 40.67-1.00 5

[0199] The two scores determined above, i.e. for normalised averagesaturation and fraction of sufficiently brown pixels are now addedtogether to give a measure in the range 0 to 8. The higher this numberis, the more oestrogen (ER) positive the sample is, as shown in Table 6below. TABLE 6 Description of ER status (ER Score) Range Stronglypositive 7-8 Positive 4-6 Weakly positive 2-3 Negative 0-1

[0200] Women with an ER score of 7 or 8 will respond favourably tohormonal treatment such as Tamoxifen; women with an ER score in therange 4 to 6 will have 50% of chance of responding to this treatment.Women scoring 2 or 3 will not respond very well, and those scoring 0 or1 will not respond to hormonal treatment at all.

[0201] Images for ER and PR are indistinguishable visually and they aredistinguished by the fact that they are produced using different stains.A PR score is therefore produced from stained slides in the same way asan ER score described above. The significance of progesterone receptor(PR) positivity in a breast carcinoma is less well understood than theequivalent for ER. In general, cancers that are ER positive will also bePR positive. However, carcinomas that are PR positive, but not ERpositive, may have a worse prognosis.

[0202] Turning now to C-erb-2 the conventional manual technique involvesprocessing a histopathological slide with chemicals to stain itappropriately, after which it is viewed by a clinician. Breast cells onthe slide will have stained nuclei with a range of areas which allowsdiscrimination between tissue cells of interest and unwanted cell typeswhich are not important to cancer assessment. Cancerous cells willusually have a larger range of sizes of nuclei which must be allowed forin the discrimination process. A clinician needs to ignore unwanted celltypes and to make a measurement by subjectively grading cells ofinterest as follows: Score Staining Pattern 0 membrane staining in lessthan 10% of cells 1 just perceptible membrane staining in more than 10%of cells but membranes incompletely stained 2 weak to moderate completemembrane staining of more than 10% of cells 3 strong complete membranestaining of more than 10% cells

[0203] Scores 0 and 1 are negative (not justifying treatment), whereasscores 2 and 3 are called positive (justifying treatment).

[0204] Unfortunately, there are artefacts which make measurement morecomplicated, as follows:

[0205] Retraction (shrinking) artefact: less sharply defined than truemembrane staining;

[0206] Thermal artefact: if a electrocautery instrument is used, ratherill-defined staining occurs;

[0207] Crushing artefact: the tissue is inadvertently mechanicallydeformed allowing more ill-defined staining.

[0208] Thermal and crushing artefacts are normally confined toboundaries of a tissue specimen and would hopefully be excluded to someextent by a clinician photographing tiles from a slide. However, it isstill important to guard against ill-defined staining not attached to acell membrane.

[0209] The technique of this invention attempts to measure theparameters mentioned above namely:

[0210] Completeness of cell membrane staining;

[0211] Intensity and thinness of cell membrane staining; and

[0212] Ratio of cell membrane staining.

[0213] There are two main stages in the present invention, and these mayoptionally be preceded by pre-processing if images are poor. The mainstages are:

[0214] finding cell nuclei which satisfy area and location limitationsassociated with tumours; and

[0215] determining a score which characterises the membranes of the cellnuclei found in the preceding stage.

[0216] Referring now to FIG. 7, the C-erb-2 technique of the inventionwill firstly be outlined and later described in more detail. An optionalpreprocessing step 70 is carried out if images of tiles are poor due tocamera vignetting or colour errors across the image.

[0217] Image segmentation is carried out in steps 71 to 78, i.e.automated separation of objects from a background in a digital image.The original digital image of a tile has red, green and blue imageplanes: from the green and blue image planes a cyan image plane isderived at 71 and a Sobel-filtered cyan image plane at 72. There are nowfive image planes: of these only the red and blue image planes areessential with conventional colour staining, the other image planes areused for desirable but not essential filtering operations upon the redimage planes. Statistical measures of the five image planes are computedat 74 and 76, and then a segmented image is optimised and generated at78 which has been filtered to remove unwanted pixels and spatial noise.The segmented image identifies cell nuclei. Step 78 is an adaptivethresholding technique using information from regions around pixels: itis shown in more detail within chain lines 80 with arrows 82 indicatingiterations. It is an alternative to the K-means clustering algorithmpreviously described, which could also be used.

[0218] If at 84 the number of cells found is less than 16, the image isrejected at 86: if it is 16 or greater, then having found the cellnuclei, and hence the cells, the strength, thinness and completeness ofeach cell's surrounding membrane staining are measured and the membranestainings are then ranked.

[0219] For each cell, at 88 a sequence of cross-correlation windows ofvarying widths is passed along four radii from the cell centroid todetermine the cell boundary brightness value, membrane width anddistance from the centroid of the most intense staining. Cell boundarybrightness value is normalised by dividing by membrane width, andnuclear area and sum of normalised boundary brightness values are thenobtained. Statistical measures characterising membrane-stainingstrength, specificity and completeness are then deduced: these measuresare compared with equivalents obtained from four reference images. Themeasured image is then graded by assigning it a score which is that ofthe closest reference, with the metric of Euclidean-distance. Othermetrics may also be used. Alternatively, the scores of a moderatelylarge sample may be used as references.

[0220] The C-erb-2 process will now be described in more detail. Theprocess 18 is applied to one image or tile obtained by magnifying by afactor of 40 an area of a histological slide. Referring to FIG. 7 oncemore, The optional preprocessing step 70 is carried out by either:

[0221] (a) dividing the image into a suitable number of tiles (with lessindividual variability) and processing them separately—this should beconsidered an option in general, though it is not necessary if there isreasonable uniformity across individual images; or

[0222] (b) preferably, if.sufficient images are available from the samecamera objective lens, computing its deficiency and correcting it,rather than processing sub-images with more part-cells split acrossboundaries.

[0223] The digital image of a slide is a three colour or red green andblue (RGB) image as defined above, i.e. there is a respective imageplane for each colour. For the purposes of the following analysis, theletters R, G and B for each pixel are treated as the red green and blueintensities at that pixel. The RGB image is used at 71 to compute a cyanimage derived from the blue and green image planes: i.e. for each pixela cyan intensity C is computed from C=(2×B+G)/3, the respective pixel'sgreen (G) intensity being added to twice its blue (B) intensity and theresulting sum being divided by three. When repeated for all pixels thisyields a cyan image or image plane. Cyan is used because it is acomplementary colour to brown, which is the cell boundary colourproduced by conventional chemical staining of a specimen. The blue imageplane could be used instead but does not normally produce results asgood as the cyan image. If a different colour staining were to be use,the associated complementary colour image would be selected. Thisprocess step is not essential but it greatly assists filtering outunwanted pixels and it does so without a reference colour (see the ER/PRexample which uses an alternative approach).

[0224] At 72, a Sobel edge filter is applied to the cyan image plane:this is a standard image processing technique published in Klette R., &Zamperoni P., ‘Handbook of image processing operators’, John Wiley &Sons, 1995. A Sobel edge filter consists of two 3×3 arrays of numbersS_(P) and S_(Q), each of which is convolved with successive 3×3 arraysof pixels in an image. Here $\begin{matrix}{S_{P} = {{\begin{bmatrix}1 & 2 & 1 \\0 & 0 & 0 \\{- 1} & {- 2} & {- 1}\end{bmatrix}\quad \text{and}\quad S_{Q}} = \begin{bmatrix}1 & 0 & {- 1} \\2 & 0 & {- 2} \\1 & 0 & {- 1}\end{bmatrix}}} & (11)\end{matrix}$

[0225] The step 72 initially selects a first cyan 3×3 array of pixels inthe top left hand corner of the cyan image: designating as C_(ij) ageneral cyan pixel in row i and column j, the top left hand corner ofthe image consists of pixels C₁₁, to C₁₃, C₂₁ to C₂₃ and C₃₁ to C₃₃.C_(ij) is then multiplied by the respective digit of S_(P) located inthe S_(P) array as C_(ij) is in the 3×3 cyan pixel array: i.e. C₁₁ toC₁₃ are multiplied by 1, 2 and 1 respectively, C₂₁ to C₂₃ by zeroes andC₃₁ to C₃₃ by −1, −2 and −1 respectively. The products so formed areadded algebraically and provide a value p.

[0226] The value of p will be relatively low for pixel values changingslowly between the first and third rows either side of the row of C₂₂,and relatively high for pixel values changing rapidly between thoserows: in consequence p provides an indication of image edge sharpnessacross rows. This procedure is repeated using the same pixel array butwith S_(Q) replacing S_(P), and a value q is obtained: q is relativelylow for pixel values changing slowly between the first and third columnseither side of the column of C₂₂, and relatively high for pixel valueschanging rapidly between those columns: and q therefore provides anindication of image edge sharpness across columns. The square root ofthe sum of the squares of p and q are then computed i.e. {squareroot}{square root over (p²+q²)}, which is defined as an “edge magnitude”and becomes T₂₂ (replacing pixel C₂₂ at the centre of the 3×3 array) inthe transformed cyan image. It is also possible to derive an edge “phaseangle”as tan⁻¹p/q, but that is not required in the present example.

[0227] A general pixel T_(ij) (row i, column j) in the transformed imageis derived from C_(i−1,j−1) to C_(i−1,j+1), C_(i,j−1) to C_(i,j+1) andC_(i+1,j−1) to C_(i+1,j+1) of the cyan image. Because the central rowand column of the Sobel filters in Equation (11) respectively are zeros,and other coefficients are 1s and 2s, p and q for T_(ij) can becalculated as follows:

p={C _(i−1,,j−1)+2C _(i−1,j) +C _(i−1,,j+1) }−{C _(i+1,,j−1)+2C_(i+1,+1)}  (12)

q={C _(i−1,,j−1)+2C _(i,j−1) +C _(i+1,,j−1) }−{C _(i−1,,j+1)+2C _(i,j+1)+C _(i+1,j+1)}  (13)

[0228] Beginning with i=j=2, p and q are calculated for successive 3×3pixel arrays by incrementing j by 1 and evaluating Equations (2) and (3)for each such array until the end of a row is reached; j is thenincremented by 1 and the procedure is repeated for a second row and soon until the whole image has been transformed. This transformed image isreferred to below as the “Sobel of Cyan” image or image plane.

[0229] The Sobel filter cannot calculate values for pixels at imageedges having no adjacent pixels on one or other of its sides: i.e. in apixel array having N rows and M columns, edge pixels are the top andbottom rows and the first and last columns, or in the transformed imagepixels T₁₁ to T_(1M), T_(N1) to T_(NM), T₁₁ to T_(1M) and T_(1M) toT_(NM). By convention in Sobel filtering these edge pixels are set tozero.

[0230] A major problem with measurements on histopathological images isthat the staining of different slides can vary enormously, e.g. fromblue with dark spots to off-white with brown outlines. The situation canbe improved by sifting the slides and using only those that conform to apredetermined colouration. However, it has been found that it ispossible to cope with variation in staining to a reasonable extent byusing statistical techniques to normalise images: in this connectionsteps 74 and 76 derive a variety of statistical parameters for use inimage segmentation in step 78.

[0231] In Step 74 is computed the mean and standard deviation of thetransformed pixel values T_(ij). For convenience a change ofnomenclature is implemented: index k is substituted for i and j, i.e.k=1 to NM for i, j=1, 1 to N, M: this treats a two dimensional image asa single composite line composed of successive rows of the image. Also xis substituted for T in each pixel value, so T_(ij) becomes X_(k). Thefollowing Equations (14) and (15) respectively are used for computingthe mean μ and standard deviation σ of the transformed pixels x_(k).$\begin{matrix}{\mu = {\frac{1}{NM}{\sum\limits_{k = 1}^{NM}\quad x_{k}}}} & (14) \\{\sigma = \sqrt{\frac{1}{{NM} - 1}{\sum\limits_{k = 1}^{NM}\quad \left( {x_{k} - \mu} \right)^{2}}}} & (15)\end{matrix}$

[0232] At 76, various statistical parameters are computed for the Red,Green, Blue and Cyan image planes using Equations (14) and (15) above.

[0233] For the Red image plane the statistical parameters are the meanμ_(R) and standard deviation σ_(R) of its pixel values: in Equations(14) and (15), x_(k) represents a general pixel value in the Red imageplane. In addition, the Red image plane's pixels are compared with oneanother to obtain their maximum, minimum and range (maximum-minimum).Similarly, pixels in each of the Green and Blue image planes arecompared with one another to obtain a respective maximum, minimum andrange for each plane. Finally, for the Cyan image, pixels' mean andstandard deviation are computed using Equations (14) and (15), in whichx_(k) represents a general pixel value in the Cyan image plane.

[0234] In step 78, the image is segmented to identify and locate cellnuclei. a pixel is counted as part of a cell nucleus if and only if itsurvives a combination of thresholding operations on the Red, Green,Blue, Cyan and Sobel of Cyan image planes followed by closure of imagegaps left after thresholding operations. It is necessary to determinethreshold values in a way which allows for variation in chemicalstaining between different images. The technique employed in thisexample is to perform a multidimensional optimisation of some thresholdswith nuclei-number as the objective-function to be maximised: i.e. for agiven image, threshold values are altered intelligently until a nearmaximum number of nuclei is obtained. Starting values are computed forthe optimisation routines by choosing those suitable for provision ofthreshold levels. In this example, two dimensional optimisation is usedrequiring three starting values indicated by suffixes 1, 2 and 3 andeach with two components: the starting values represent vertices of atriangle in a two dimensional plane. The starting values are RMM1/CMM1,MMM2/CMM2 and RMM3/CMM3, RMM indicating a “Red Mean Multiplier” and CMMindicating a “Cyan Mean Multiplier”. Tests using a substantial number ofimages have shown that suitable starting values are RMM1=0.802,CMM1=1.24, RMM2=CMM2=0.903, RMM3=1.24 and CMM3=0.802.

[0235] For images counterstained with Haemotoxylin and Eosin (H&E) cellnuclei are strongly stained blue—i.e. they have very low values in thecomplementary red plane. Hence the red plane is the primary plane usedin thresholding as follows:

[0236] (a) Produce a thresholded image for the Red image plane(approximately complimentary to Blue) as follows: for every Red pixelvalue that is less than an adaptive threshold, set the correspondingpixel location in the thresholded Red image to 1, otherwise set thelatter to 0. A respective adaptive threshold is computed separately forevery pixel location as follows. At a) in step 78, the Red imagethreshold value is dependent on the presence of enclosing brown stain inthe neighbourhood of each pixel, i.e. it is a function of Cyan meanμ_(C) and Red mean μ_(R). A check for enclosing brown is performed bysearching radially outwards from a pixel under consideration. Theprocedure is in the Cyan image plane to select the same pixel locationas in the Red image plane and from it to search in fourdirections—north, south, east and west directions—for a distance ofseventy pixels (or as many as are available up to seventy). Here north,south, east and west have the following meanings: north: upward from thepixel in the same column; south: downward from the pixel in the samecolumn; east: rightward from the pixel in the same row; and west:leftward from the pixel in the same row. More directions (e.g. diagonalsnorth-east, north-west, south-east and south-west) could be used toimprove accuracy but four have been found to be adequate for the presentexample. In any of these directions or radii either a cyan pixel willfall below a threshold (indicating a brown pixel) or a radius of 70pixels will be reached without a cyan pixel doing so. The number R_(B)of “brown” radii (radii intersecting at least one brown pixel) is thenused to change the red threshold adaptively in the following way: Thereis calculated a new Red image plane thresholdRTN=RMM1μ_(R)−σ_(R)(4−R_(B)), where RMM1μ_(R) is the product of RMM1 andμ_(R) and σ_(R) is the standard deviation of the Red image plane. Alimit is placed on RTN giving it a maximum possible value of 255. If theRed image plane pixel under consideration is less than the Red imageplane threshold calculated for it, the corresponding pixel at the samelocation in the thresholded Red image is set to one, otherwise it is setto zero.

[0237] (b) Using the Cyan image plane, and with the Cyan mean μ_(C) fromstep 74, for every Cyan pixel value that is less than the product ofCMM1 and μ_(C), set the pixel in the corresponding location in thethresholded Red image to 0, otherwise do not change the pixel. This hasthe effect of removing excess brown pixels.

[0238] (c) Using the Sobel of Cyan image plane, and with the Cyan meanμ_(C) and standard deviation σ_(C) from step 74: i.e. for every Cyanpixel value that is greater than (μ_(C)+1.5σ_(C)) set the correspondingpixel in the thresholded Red image to 0, otherwise do not change thepixel. This has the effect of removing brown edge pixels.

[0239] (d) Pixels corresponding to lipids are now removed as follows:using the pixel minimum and range values computed at step 76, athresholded Red image is produced using data obtained from the Red,Green and Blue image planes: for each Red, Green and Blue pixel group ata respective pixel location that satisfies all three criteria at (i) to(iii) below, set the pixel at the corresponding location in thethresholded Red image to 0, otherwise do not change the pixel; this hasthe effect of removing lipid image regions (regions of fat which appearas highly saturated white areas). Removal of these regions is notessential but is desirable to improve processing. The criteria for eachset of Red, Green and Blue values at a respective pixel are:

[0240] (i) Red value>Red minimum+0.98×(red range), AND

[0241] (ii) Green pixel>Green minimum+0.98×(green range), AND

[0242] (iii) Blue pixel>Blue minimum+0.98×(blue range)

[0243] Steps (c) and (d) could be moved outside the recursion loopdefined within chain lines 80 if desired, with consequent changes to theprocedure.

[0244] (e) The next step is to apply to the binary image obtained atstep (d) of 78 above a morphological closing operation, which consist ofa dilation operation followed by an erosion operation. Thesemorphological operations fuse narrow gaps and eliminate small holes inindividual groups of contiguous pixels appearing as blobs in an image.They are not essential but they improve processing. They can be thoughtof as removal of irregularities or spatial “noise”, and they arestandard image processing procedures published in Umbaugh S. C., ‘Colourvision and image processing’, Prentice Hall, 1998.

[0245] (f) A connected component labelling process is now applied to thebinary image produced at step (e). This is a known image processingtechnique (sometimes referred to as ‘blob colouring’) published by RKlette and P Zamperoniu, ‘Handbook of Image Processing Operators’, JohnWiley & Sons, 1996, and A Rosenfeld and A C Kak, ‘Digital PictureProcessing’, Vols. 1 & 2, Academic Press, New York, 1982. It givesnumerical labels to “blobs” in the binary image, blobs being regions orgroups of like-valued contiguous or connected pixels in an image: i.e.each group or blob consists of connected pixels which are all 1s, andeach is assigned a number different to those of other groups. Thisenables individual blobs to be distinguished from others by means oftheir labels. The number of labelled image regions or blobs in the imageis computed from the labels and output. Connected component labellingalso determines each labelled image region's centroid (pixel location ofregion centre), height, width and area. Image regions are now removedfrom the binary image if they are not of interest because they are toosmall or too large in area or they have sufficiently dissimilar heightand width indicating they are flattened. The remaining regions in thebinary image pass to the next stage of processing at (g).

[0246] Steps (a) to (f) are carried out for all three starting points ortriangle vertices RMM1/CMM1, RMM2/CMM2 and RMM3/CMM3: this yields threevalues for the number of regions remaining in the binary image in eachcase.

[0247] (g) This step is referred to as the Downhill Simplex method: itis a standard iterative statistical technique for multidimensionaloptimisation published in Nelder J. A., Mead R., 1965, Computer Journal,vol. 7, pp 308-313, 1965. It takes as input the three numbers of regionsremaining after step (f). It is possible to use other optimisationtechniques such as that referred to as Powell which uses gradients. Thestarting point/vertex yielding the lowest number of regions remaining isthen selected. A new starting point is then generated as the reflectionof the selected vertex in the line joining to the two other vertices:i.e. if the three vertices were to have been at 1,1, 1,2 and 2,1, and1,1 was the selected vertex, then the new starting point is 2,2. Theselected vertex is then discarded and the other two retained. The newstarting point or vertex becomes RMM4/CMM4 and steps (a) to (f) arerepeated using it to generate a new number of regions remaining forcomparison with those associated with the two retained vertices. Again avertex yielding the lowest number of regions remaining is selected, andthe process of new RMM/CMM values and steps (a) to (f) is iterated asindicated by arrows 82. Iterations continue until the rate of change ofremaining number of image regions (cell nuclei number) slows down, i.e.when successive iterations show a change of less than 10% in thisnumber: at that point optimisation is terminated and the binary imageremaining after step (f) selected for further processing is thatgenerated using the RMM/CMM values giving the highest nuclei number.

[0248] The procedure 18 is now concerned with determining quantitiesreferred to as “grand_mean” and “mean_range” to be defined later. If theDownhill Simplex method (g) has determined that there are less than auser specified number of image regions or cell nuclei, sixteen in thepresent example, then at 84 processing is switched to 86 indicating aproblem image which is to be rejected.

[0249] If the Downhill Simplex method has determined that there are atleast sixteen image regions, then at 84 processing is switched to 88where a search to characterise these regions' boundaries is carried out.The search uses each region's area and centroid pixel location asobtained in connected component labelling at 78(f), and each region isassumed to be a cell with a centroid which is the centre of the cell'snucleus. This assumption is justified for most cells, but there may bemisshapen cells for which it does not hold: it is possible to discardmisshapen cells by eliminating those with concave boundary regions forexample, but this is not implemented in the present example.

[0250] The search to characterise the regions' boundaries is carried outalong the respective north, south, east and west directions (as definedearlier) from the centroid (more directions may be used to improveaccuracy): it is carried out in each of these directions for a distanceδ which is either 140 pixels or 2{square root}{square root over (regionarea)}, whichever is the lesser. It employs the original (2B+G)/3 cyanimage because experience shows that this image gives the best definedcell boundaries with the slide staining previously described.Designating C_(ij) as the intensity of a region's centroid pixel in thecyan image at row i and column j, then pixels to be searched north,south, east and west of this centroid will have intensities in the cyanimage of C_(i+1,j) to C_(i+δ,j), C_(i−1,j) to C_(i−δ,j), C_(i,j+1) toC_(i,j+δ) and C_(i,j−1) to C_(i,j−δ) respectively. The cyan intensity ofeach of the pixels to be searched is subtracted from the centroidpixel's cyan intensity C_(ij) to produce a difference value, which maybe positive or negative. In a cyan image, a cell nucleus is normallyblue whereas a boundary is brown (with staining as described earlier).

[0251] Each pixel is then treated as being part of four linear groups or“windows” of six, twelve, twenty-four and forty-eight pixels eachincluding the pixel and extending from it in a continuous line north,south, east or west (as defined earlier) according respectively towhether the pixel is north, south, east or west of the centroid. Ineffect pixels in each of the chosen directions have mathematical windowfunctions applied to them, the function having the value 1 at pixelswithin a group and the value 0 outside it. In the linear groups in thepresent example, C_(i+1,j) is for example grouped with C_(i+2,j) toC_(i+6,j), C_(i+2,j) to C_(i+12,j), C_(i+2,j) to C_(i+24,j), andC_(i+2,j) to C_(i+48,j) (inclusive in each case). This provides a totalof 16δ groups from 4δ groups in each of four directions. For each groupthe difference between each of its pixels' cyan intensities and that ofthe centroid is calculated: the differences are summed over the groupalgebraically (positive and negative differences cancelling oneanother). This sum is divided by the number of pixels in the group toprovide a net difference per pixel between the cyan intensities of thegroup's pixels and that of the centroid.

[0252] For each direction, i.e. north, south, east and west, there isnow a respective set of 4δ net differences per pixel: in each set thenet differences per pixel are compared and their maximum value isidentified. This produces a respective maximum net difference per pixelfor each of the sets, i.e. for each of the north, south, east andwest-directions, and size of window (number of pixels in group) in whichthe respective maximum occurred. The four maxima so obtained (one foreach direction) and the respective window size in each case are stored.Each maximum is a measure of the region boundary (cell membrane)magnitude in the relevant direction, because in a cyan image the maximumdifference as compared to a blue cell nucleus occurs at a brown cellboundary. The window size associated with each maximum indicates theregion boundary width, because a boundary width will give a highermaximum in this technique with a window size which it more nearlymatches as compared to one it matches less well. Greater accuracy isobtainable by using more window sizes and windows matched to cellboundary shape, i.e. multiplying pixels in each linear group byrespective values collectively forming a boundary shape function. Theprocess is in fact mathematically a correlation operation in which awindow shape is correlated with a linear group of pixels. A furtheroption is to record the position of the maximum or boundary (cellradius) as being that of one of the two pixels at the centre of thewindow in which the maximum occurs: this was not done in the presentexample, although it would enable misshapen cells to be detected anddiscarded as being indicated by significant differences in the positionsof maxima in the four directions, and it would improve width measure byaccounting for oblique intersections of windows and cell boundaries.

[0253] Each maximum or region boundary magnitude is then divided by theassociated window size (region boundary width) used to derive it: thisforms what is called for the purposes of this specification a normalisedboundary magnitude—it is a measure of both brightness and sharpness: Itenables discrimination against ill-defined staining not attached to acell membrane.

[0254] The next step 90 is to apply what is referred to as a “quicksort”to the four normalised boundary magnitudes to sort them into descendingorder of magnitude. Quicksort is a known technique published by KletteR., Zamperoniu P., ‘Handbook of Image Processing

[0255] Operators’, John Wiley & Sons, 1996, and will not be described.It is not essential but convenient. For each image region, measurementsmade as described above are now recorded in a respective 1-dimensionalvector as set out in Table 7 below: in this table the directions North,East etc are lost in the quicksort ordering into largest, secondlargest, third largest and smallest. TABLE 7 Item number Parameter 1Largest normalised boundary magnitude 2 Second Largest normalisedboundary magnitude 3 Third Largest normalised boundary magnitude 4Smallest normalised boundary magnitude 5 Sum of Largest, Second Largest,Third Largest and Smallest normalised boundary magnitudes

[0256] A further quicksort is now applied (also at 90) to the imageregions to sort them into descending order of item 5 values in Table 7above, i.e. sum of Largest, Second Largest, Third Largest and Smallestnormalised boundary magnitudes. A subset of the image regions is nowselected as being those having large values of item 5: these are themost significant image regions and they are the best one eighth of thetotal number of image regions in terms of item 5 magnitude. From thissubset of image regions the following parameters are computed at 92,“grand_mean”, “mean_range” and “relative_range” as defined below:

octile=one eighth of the total number of image regions or cellnuclei  (16)

boundaries=normalised boundary magnitudes  (17)

Σ=sum of . . . (over all boundaries in the subset or best octile)  (18)

item 1=Largest normalised boundary magnitude  (19)

item 3=Third Largest normalised boundary magnitude  (20)

grand_mean=6×[(ΣLargest boundaries)+(ΣSecond Largest boundaries)+(ΣThird Largest boundaries)+(ΣSmallest boundaries)]/4octile  (21)

mean_range=[(Σitem 1)−(Σitem 3)]/octile  (22)

relative_range=10×mean_range/grand_mean  (23)

[0257] Grand_mean is indicative of the degree to which an image exhibitsgood cell boundary sharpness and brightness. Relative_range indicatesthe degree to which an image exhibits brightness extending around cellboundaries—the smallest boundaries (item 4) are omitted from thiscomputation to provide some robustness against incomplete cells. A cellboundary that exhibits a large value of relative_range will havebrightness varying appreciably around the boundary corresponding tonon-uniformity of staining or possibly even absence of a boundary.

[0258] At 94 an overall distance measure is computed: this measureprovides an estimate of how far the current cyan image (generated at 71)is from each member of a predetermined standard set of images, fourimages in the present example. In this example the distance measure iscomputed against a set of four predetermined standard images: thestandard images were obtained by dividing a large test dataset of imagesinto four different image types corresponding respectively to fourdifferent C-erb-2 status indicators (as will be described later in moredetail). The images of each image type were analysed to determine grandmean and relative range for each image using the process 18. Arespective average grand mean M_(i) (i=0, 1, 2 and 3) and a respectiveaverage relative range RR_(i) were determined for the images of each ofthe four image types. As an alternative, it is also possible to selectfour good quality images of the relevant types by inspection from manyimages, and to determine M_(i) and RR_(i) from them. The values M_(i)and RR_(i) become the components of respective four-element vectors Mand RR, and are used in the following expression:

C-erb-2 indicator=min_(i){(M_(i)−grand mean)²+(RR_(i)−relativerange)²}  (24)

[0259] where min_(i) is the value of i (i=0, 1, 2 or 3) for which theexpression within curved brackets { } on the right of Equation (24) is aminimum. For the vector M, from the dataset the following elements weredetermined: M_(O)=12.32, M₁=23.16, M₂=42.34 and M₃=87.35; elementsdetermined likewise for the vector RR were RR₀=2.501, RR₁=1.85,RR₂=1.111 and RR₃=0.5394. The value of the index i is returned as theindicator for the C-erb-2 measurement process.

[0260] If a value of i=3 is obtained in the C-erb-2 measurement process,this is regarded as a strongly positive result: the patient from whomthe original tissue samples were taken is regarded as highly suitablefor treatment, currently with herceptin. A value of i=2 is weaklypositive indicating doubtful suitability for treatment, and i=1 or 0 isa negative result indicating unsuitability. This is tabulated below inTable 8. TABLE 8 C-erb-2 status i Value Strongly positive 3 Weaklypositive 2 Negative 0, 1

[0261] Referring now to FIG. 8, there is shown a flow diagram of theprocess 14 (see FIG. 1) for measurement of vascularity. The process 14is applied to three images each of ×20 magnification compared to thehistopathological slide from which they were taken. At 100 each image istransformed from red/green/blue (RGB) to a different image spacehue/saturation/value (HSV). The RGB to HSV transformation is describedby K. Jack in ‘Video Demystified’, 2^(nd) ed., HighText Publications,San Diego, 1996. In practice value V (or brightness) is liable to varydue to staining and thickness variations across a slide, as well aspossible vignetting by a camera lens used to produce the images. Inconsequence in this example the V component is ignored: it is notcalculated, and emphasis is placed on the hue (or colour) and saturationvalues H and S. H and S are calculated for each pixel of the two RGBimages as follows:

Let M=maximum of (R,G,B)  (25)

Let m=minimum of (R,G,B)  (26)

Then newr=(M−R)/(M−m)  (27)

newg=(M−G)/(M−m) and  (28)

newb=(M−B)/(M−m)  (29)

[0262] This converts each colour of a pixel into the difference betweenits magnitude and that of the maximum of the three colour magnitudes ofthat pixel, this difference being divided by the difference between themaximum and minimum of (R,G,B).

[0263] Saturation (S) is set as follows:

if M equals zero, then S=0  (30)

if M does not equal zero, then S=(M−m)/M  (31)

[0264] The calculation for Hue (H) is as follows: from Equation (25) Mmust be equal to at least one of R, G and B:

if M equals zero, then H=180  (32)

If M equals R then H=60(newb−newg)  (33)

If M equals G then H=60(2+newr−newb)  (34)

If M equals B then H=60(4+newg−newr)  (35)

If H is greater than or equal 360 then H=H −360  (36)

If H is less than 0 then H=H+360  (37)

[0265] The Value V is not used in this example, but were it to be usedit would be set to the maximum of (R,G,B).

[0266] The next step 102 is to apply colour segmentation to obtain abinary image. This segmentation is based on thresholding using the Hueand Saturation from the HSV colour space, and is shown in Table 9 below.TABLE 9 Binary Image Threshold Criterion Pixel Value Pixel with both HueH in the range 282-356 degrees Set pixel to 1 (scale 0 to 360), andSaturation S in the range 0.2 to 0.24 (scale 0 to 1) Pixel with eitherHue outside the range 282-356 Set pixel to 0 degrees, and/or Saturationoutside the range 0.2-0.24

[0267] This produces a segmented binary image in which pixels set to 1are processed further and those set to 0 are discarded.

[0268] The next stage 104 is to apply connected component labelling (asdefined previously) to the segmented binary image: this provides abinary image with regions of contiguous pixels equal to 1, the regionsbeing uniquely labelled for further processing and their areas beingdetermined. The labelled binary image is then spatially filtered toremove small connected components (image regions with less than 10pixels) which have insufficient pixels to contribute to vascularity:this provides a reduced binary image.

[0269] The sum of the area of the remaining image regions in the reducedbinary image is then determined at 106 from the results of connectedcomponent labelling, and this sum is then expressed as a percentage ofthe area of the whole image. This procedure is carried out for each ofthe original RGB images separately to provide three such percentage areavalues: the average of the three percentage area values is computed, andit represents an estimate of the percentage of the area of a tissuesample occupied by blood vessels—i.e. the sample vascularity.

[0270] As set out in Table 10 below, vascularity is determined to behigh or low depending on whether or not it is equal to at least 31%.TABLE 10 Description of vascularity Range High  31%-100% Low  0%-30%

[0271] High vascularity corresponds to relatively fast tumour growthbecause tumour blood supply has been facilitated, and early treatment isindicated. Low vascularity corresponds to relatively slow tumour growth,and early treatment is less important.

[0272] The procedures given in the foregoing description for calculatingquantities and results can clearly be evaluated by an appropriatecomputer program recorded on a carrier medium and running on aconventional computer system. Such a program is straightforward for askilled programmer to implement without requiring invention, because themathematical expressions used are well known computational procedures.Such a program and system will therefore not be described.

[0273] The process steps described in the examples of all threeinventions described herein are not all essential and alternatives maybe provided. It is for example possible to omit a step of ignoringunsuitably small areas in selecting areas for later processing, if theconsequent increase in processing burden is acceptable. The aboveexamples are intended to provide an enabling disclosure, not to limitthe invention.

1. A method of measuring oestrogen or progesterone receptor (ER or PR)status having the steps of: a) obtaining histopathological specimenimage data; and b) identifying in the image data groups of contiguouspixels corresponding to respective cell nuclei; characterised in thatthe method also includes the steps of: c) deriving hue and saturationfor the image data in a colour space having a hue coordinate and asaturation coordinate; d) thresholding the image data on the basis ofhue and saturation and identifying pixels corresponding to cells whichare preferentially stained relative to surrounding specimen tissue; ande) determining ER or PR status from proportion of pixels correspondingto preferentially stained cells.
 2. A method of measuring ER or PRstatus having the steps of: a) obtaining histopathological specimenimage data; and b) identifying in the image data groups of contiguouspixels corresponding to respective cell nuclei; characterised in thatthe method also includes the steps of: c) deriving hue and saturationfor the image data in a colour space having a hue coordinate and asaturation coordinate; d) thresholding the image data on the basis ofhue and saturation and identifying pixels corresponding to cells whichare preferentially stained relative to surrounding specimen tissue; ande) determining ER or PR status from normalised average saturation.
 3. Amethod of measuring ER or PR status having the steps of: a) obtaininghistopathological specimen image data; and b) identifying in the imagedata groups of contiguous pixels corresponding to respective cellnuclei; characterised in that the method also includes the steps of: c)deriving hue and saturation for the image data in a colour space havinga hue coordinate and a saturation coordinate; d) thresholding the imagedata on the basis of hue and saturation and identifying pixelscorresponding to cells which are preferentially stained relative tosurrounding specimen tissue; and e) determining ER or PR status fromnormalised average saturation and fraction of pixels corresponding topreferentially stained cells.
 4. A method according to claim 3characterised in that step b) is implemented using a K-means clusteringalgorithm.
 5. A method according to claim 4 characterised in that theK-means clustering algorithm employs a Mahalanobis distance metric.
 6. Amethod according to claim 3 characterised in that step c) is implementedby transforming the image data into a chromaticity space, and derivinghue and saturation from image pixels and a reference colour.
 7. A methodaccording to claim 6 characterised in that hue is obtained from an angleφequal to$\sin^{- 1}\frac{\left| {{\overset{\sim}{x}y} - {x\overset{\sim}{y}}} \right|}{\sqrt{{\overset{\sim}{x}}^{2} + {\overset{\sim}{y}}^{2}}\sqrt{x^{2} + y^{2}}}$

and saturation from an expression$\frac{{x\overset{\sim}{x}} + {y\overset{\sim}{y}}}{{\overset{\sim}{x}}^{2} + {\overset{\sim}{y}}^{2}},$

where (x, y) and ({tilde over (x)}, {tilde over (y)}) are respectivelyimage pixel coordinates and reference colour coordinates in thechromaticity space.
 8. A method according to claim 6 characterised inthat hue is adapted to lie in the range 0 to 90 degrees and a huethreshold of 80 degrees is set in step d).
 9. A method according toclaim 6 or 8 characterised in that a saturation threshold S_(o) is setin step d), S_(o) being 0.9 for saturation in the range 0.1 to 1.9 and 0for saturation outside this range.
 10. A method according to claim 3characterised in that the fraction of pixels corresponding topreferentially stained cells is determined by counting the number ofpixels having both saturation greater than a saturation threshold andhue modulus less than a hue threshold and expressing such number as afraction of a total number of pixels in the image.
 11. A methodaccording to claim 3 characterised in that the normalised averagesaturation is accorded a score 0, 1, 2 or 3 according respectively towhether it is (i) ≦25%, (ii) >25% and ≦50%, (iii) >50% and ≦75% or(iv) >75% and ≦100%.
 12. A method according to claim 11 characterised inthat the fraction of pixels corresponding to preferentially stainedcells is accorded a score 0, 1, 2, 3, 4 or 5 according respectively towhether it is (i) 0, (ii) >0 and <0.01, (iii) ≧0.01 and ≦0.10, (iv)≧0.11 and ≦0.33, (v) ≧0.34 and ≦0.66 or (vi) ≧0.67 and ≦1.0.
 13. Amethod according to claim 12 characterised in that the scores fornormalised average saturation and fraction of pixels corresponding topreferentially stained cells are added together to provide a measurementof ER or PR.
 14. A method according to claim 3 characterised in that thefraction of pixels corresponding to preferentially stained cells isaccorded a score 0, 1, 2, 3, 4 or 5 according respectively to whether itis (i) 0, (ii) >0 and <0.01, (iii) ≧0.01 and ≦0.10, (iv) ≧0.11 and≦0.33, (v) ≧0.34 and ≦0.66 or (vi) ≧0.67 and ≦1.0.
 15. A methodaccording to claim 3 characterised in that step e) is carried out byobtaining a score for normalised average saturation and a score forfraction of pixels corresponding to preferentially stained cells andadding the scores together.
 16. A method according to claim 1, 2 or 3characterised in that it also includes measuring C-erb-2 status by thefollowing steps: a) correlating window functions of different lengthswith pixel sub-groups within the identified contiguous pixels groups toidentify pixels associated with cell boundaries, b) computingbrightness-related measures of cell boundary brightness and sharpnessand brightness extent around cell boundaries from pixels correspondingto cell boundaries, c) comparing the brightness-related measures withpredetermined equivalents obtained from comparison images associatedwith different values of C-erb-2, and d) assigning to the image data aC-erb-2 value which is that associated with the comparison image havingbrightness-related measures closest to those determined for the imagedata.
 17. A method according to claim 1, 2, 3 or 16 characterised inthat it also includes measuring vascularity by the following steps: a)deriving hue and saturation for the image data in a colour space havinga hue coordinate and a saturation coordinate; b) producing a segmentedimage by thresholding the image data on the basis of hue and saturation;c) identifying in the segmented image groups of contiguous pixels; andd) determining vascularity from the total area of the groups ofcontiguous pixels which are sufficiently large to correspond tovascularity, such area being expressed as a proportion of the imagedata's total area.
 18. A method of measuring C-erb-2 status having thesteps of: a) obtaining histopathological specimen image data; and b)identifying in the image data contiguous pixel groups corresponding torespective cell nuclei associated with surrounding cell boundarystaining; characterised in that the method also includes the steps of:c) correlating window functions of different lengths with pixelsub-groups within the identified contiguous pixels groups to identifypixels associated with cell boundaries, d) computing brightness-relatedmeasures of cell boundary brightness and sharpness and brightness extentaround cell boundaries from pixels corresponding to cell boundaries, e)comparing the brightness-related measures with predetermined equivalentsobtained from comparison images associated with different values ofC-erb-2, and f) assigning to the image data a C-erb-2 value which isthat associated with the comparison image having brightness-relatedmeasures closest to those determined for the image data.
 19. A methodaccording to claim 18 characterised in that at least some of the windowfunctions have non-zero values of 6, 12, 24 and 48 pixels respectivelyand zero values elsewhere.
 20. A method according to claim 18characterised in that pixels associated with a cell boundary areidentified from a maximum correlation with a window function, the windowfunction having a length which provides an estimate of cell boundarywidth.
 21. A method according to claim 18 characterised in that abrightness-related measure of cell boundary brightness and sharpness iscomputed in step d) using a calculation including dividing cellboundaries by their respective widths to provide normalised boundarymagnitudes, selecting a fraction of the normalised boundary magnitudeseach greater than unselected equivalents and summing the normalisedboundary magnitudes of the selected fraction.
 22. A method according toclaim 21 characterised in that in step d) a brightness-related measureof brightness extent around cell boundaries is computed using acalculation including dividing normalised boundary magnitudes intodifferent magnitude groups each associated with a respective range ofmagnitudes, providing a respective magnitude sum of normalised boundarymagnitudes for each magnitude group, and subtracting a smaller magnitudesum from a larger magnitude sum.
 23. A method according to claim 22characterised in that the comparison image having brightness-relatedmeasures closest to those determined for the image data is determinedfrom a Euclidean distance between the brightness-related measures of thecomparison image and the image data.
 24. A method according to claim 18characterised in that in step b) identifying in the image datacontiguous pixel groups corresponding to respective cell nuclei iscarried out by an adaptive thresholding technique arranged to maximisethe number of contiguous pixel groups identified.
 25. A method accordingto claim 24 wherein the image data includes red, green and blue imageplanes characterised in that the adaptive thresholding techniqueincludes: a) generating a mean value μ_(R) and a standard deviationσ_(R) for pixels in the red image plane, b) generating a cyan imageplane from the image data and calculating a mean value μ_(C) for itspixels, c) calculating a product CMMμ_(C) where CMM is a predeterminedmultiplier, d) calculating a quantity R_(B) equal to the number ofadjacent linear groups of pixels of predetermined length and includingat least one cyan pixel which is less than CMMμ_(C), e) for each redpixel calculating a threshold equal to {RMMμ_(R)−σ_(R)(R(4−R_(B))} andRMM is a predetermined multiplier, f) forming a thresholded red image bydiscarding each red pixel that is greater than or equal to thethreshold, g) determining the number of contiguous pixel groups in thethresholded red image, h) changing the values of RMM and CMM anditerating steps c) to g), i) changing the values of RMM and CMM oncemore and iterating steps c) to g), j) comparing the numbers ofcontiguous pixel groups determined in steps g) to i), treating the threepairs of values of RMM and CMM as points in a two dimensional space,selecting the pair of values of RMM and CMM associated with the lowestnumber of contiguous pixel groups, obtaining its reflection in the linejoining the other two pairs of values of RMM and CMM, using thisreflection as a new pair of values of RMM and CMM and iterating steps c)to g) and this step j).
 26. A method according to claim 25 characterisedin that the first three pairs of RMM and CMM values referred to in stepk) are 0.802 and 1.24, 0.903 and 0.903, and 1.24 and 0.802 respectively.27. A method according to claim 25 characterised in that that itincludes prior to step g) removing brown pixels from the thresholded redimage if like-located pixels in the cyan image are less than CMMμ_(C).28. A method according to claim 25 characterised in that it includesprior to step g) forming an edge-filtered cyan image, generating astandard deviation σ_(C) for its pixels and removing edge pixels fromthe thresholded red image if like-located pixels in the Sobel-filteredcyan image are greater than (μ_(C)+1.5σ_(C)).
 29. A method according toclaim 25 characterised in that it includes prior to step g) removingpixels corresponding to lipids from the thresholded red image if theirred green and blue pixel values are all greater than the sum of therelevant colour's minimum value and 98% of its range of pixel values ineach case.
 30. A method according to claim 25 characterised in that itincludes prior to step g) subjecting the thresholded red image to amorphological closing operation.
 31. A method of measuring vascularityhaving the steps of: a) obtaining histopathological specimen image data;characterised in that the method also includes the steps of: b) derivinghue and saturation for the image data in a colour space having a huecoordinate and a saturation coordinate; c) producing a segmented imageby thresholding the image data on the basis of hue and saturation; andd) identifying in the segmented image groups of contiguous pixels; ande) determining vascularity from the total area of the groups ofcontiguous pixels which are sufficiently large to correspond tovascularity, such area being expressed as a proportion of the imagedata's total area.
 32. A method according to claim 31 wherein the imagedata comprises pixels with red, green and blue values designated R, Gand B respectively, characterised in that a respective saturation valueS is derived in step b) for each pixel by: i) defining M and m for eachpixel as respectively the maximum and minimum of R, G and B; and ii)setting S to zero if m equals zero and setting S to (M−m)/M otherwise.33. A method according to claim 32 characterised in that hue valuesdesignated H are derived by: a) defining new values newr, newg and newbfor each pixel given by newr=(M−R)/(M−m), newg=(M−G)/(M−m) andnewb=(M−B)/(M−m) in order to convert each pixel value into thedifference between its magnitude and that of the maximum of the threecolour magnitudes of that pixel, this difference being divided by thedifference between the maximum and minimum of R, G and B, and b)calculating H as tabulated immediately below: M H 0 180 R 60(newb −newg)* G 60(2 + newr − newb)* B 60(4 + newg − newr)*


34. A method according to claim 33 characterised in that the step ofproducing a segmented image is implemented by designating for furtherprocessing only those pixels having both a hue H in the range 282-356and a saturation S in the range 0.2 to 0.24.
 35. A method according toclaim 34 characterised in that the step of identifying in the segmentedimage groups of contiguous pixels includes the step of spatiallyfiltering such groups to remove groups having insufficient pixels tocontribute to vascularity.
 36. A method according to claim 35characterised in that the step of determining vascularity includestreating vascularity as having a high or a low value according towhether or not it is at least 31%.
 37. A computer program for measuringER or PR status, the program being arranged to control computerapparatus to execute the steps of: a) processing histopathologicalspecimen image data to identify in the image data groups of contiguouspixels corresponding to respective cell nuclei; characterised in thatthe program is also arranged to implement the steps of: b) deriving hueand saturation for the image data in a colour space having a huecoordinate and a saturation coordinate; c) thresholding the image dataon the basis of hue and saturation and identifying pixels correspondingto cells which are preferentially stained relative to surroundingspecimen tissue; and d) determining ER or PR status from proportion ofpixels corresponding to preferentially stained cells.
 38. A computerprogram for measuring ER or PR status, the program being arranged tocontrol computer apparatus to execute the steps of: a) processinghistopathological specimen image data to identify in the image datagroups of contiguous pixels corresponding to respective cell nuclei;characterised in that the program is also arranged to implement thesteps of: b) deriving hue and saturation for the image data in a colourspace having a hue coordinate and a saturation coordinate; c)thresholding the image data on the basis of hue and saturation andidentifying pixels corresponding to cells which are preferentiallystained relative to surrounding specimen tissue; and d) determining ERor PR status from normalised average saturation.
 39. A computer programfor measuring ER or PR status, the program being arranged to controlcomputer apparatus to execute the steps of: a) processinghistopathological specimen image data to identify in the image datagroups of contiguous pixels corresponding to respective cell nuclei;characterised in that the program is also arranged to implement thesteps of: b) deriving hue and saturation for the image data in a colourspace having a hue coordinate and a saturation coordinate; c)thresholding the image data on the basis of hue and saturation andidentifying pixels corresponding to cells which are preferentiallystained relative to surrounding specimen tissue; and d) determining ERor PR status from normalised average saturation and fraction of pixelscorresponding to preferentially stained cells.
 40. A computer programaccording to claim 39 characterised in that step a) is implemented usinga K-means clustering algorithm.
 41. A computer program according toclaim 39 characterised in that step b) is implemented by transformingthe image data into a chromaticity space, and deriving hue andsaturation from image pixels and a reference colour.
 42. A computerprogram according to claim 41 characterised in that hue is obtained froman angle φ equal to$\sin^{- 1}\frac{\left| {{\overset{\sim}{x}y} - {x\overset{\sim}{y}}} \right|}{\sqrt{{\overset{\sim}{x}}^{2} + {\overset{\sim}{y}}^{2}}\sqrt{x^{2} + y^{2}}}$

and saturation from an expression$\frac{{x\overset{\sim}{x}} + {y\overset{\sim}{y}}}{{\overset{\sim}{x}}^{2} + {\overset{\sim}{y}}^{2}},$

where (x, y) and ({tilde over (x)}, {tilde over (y)}) are respectivelyimage pixel coordinates and reference colour coordinates in thechromaticity space.
 43. A computer program according to claim 41characterised in that hue is adapted to lie in the range 0 to 90 degreesand a hue threshold of 80 degrees is set in step c).
 44. A computerprogram according to claim 41 characterised in that a saturationthreshold S_(o) is set in step c), S_(o) being 0.9 for saturation in therange 0.1 to 1.9 and 0 for saturation outside this range.
 45. A computerprogram according to claim 39 characterised in that the fraction ofpixels corresponding to preferentially stained cells is determined bycounting the number of pixels having both saturation greater than asaturation threshold and hue modulus less than a hue threshold andexpressing such number as a fraction of a total number of pixels in theimage.
 46. A computer program according to claim 39 characterised inthat the normalised average saturation is accorded a score 0, 1, 2 or 3according respectively to whether it is (i) ≦25%, (ii) >25% and ≦50%,(iii) >50% and ≦75% or (iv) >75% and ≦100%.
 47. A computer programaccording to claim 46 characterised in that the fraction of pixelscorresponding to preferentially stained cells is accorded a score 0, 1,2, 3, 4 or 5 according respectively to whether it is (i) 0, (ii) >0 and<0.01, (iii) ≧0.01 and ≦0.10, (iv) ≧0.11 and ≦0.33, (v) ≧0.34 and ≦0.66or (vi) ≧0.67 and ≦1.0.
 48. A computer program according to claim 47characterised in that the scores for normalised average saturation andfraction of pixels corresponding to preferentially stained cells areadded together to provide a measurement of ER or PR.
 49. A computerprogram according to claim 39 characterised in that the fraction ofpixels corresponding to preferentially stained cells is accorded a score0, 1, 2, 3, 4 or 5 according respectively to whether it is (i) 0,(ii) >0 and <0.01, (iii) ≧0.01 and ≦0.10, (iv) ≧0.11 and ≦0.33, (v)≧0.34 and ≦0.66 or (vi) ≧0.67 and ≦1.0.
 50. A computer program accordingto claim 39 characterised in that step e) is carried out by obtaining ascore for normalised average saturation and a score for fraction ofpixels corresponding to preferentially stained cells and adding thescores together.
 51. A computer program according to claim 37, 38 or 39characterised in that it is also arranged for derivation of a measureC-erb-2 status by: a) correlating window functions of different lengthswith pixel sub-groups within the identified contiguous pixels groups toidentify pixels associated with cell boundaries, b) computingbrightness-related measures of cell boundary brightness and sharpnessand brightness extent around cell boundaries from pixels correspondingto cell boundaries, c) comparing the brightness-related measures withpredetermined equivalents obtained from comparison images associatedwith different values of C-erb-2, and d) assigning to the image data aC-erb-2 value which is that associated with the comparison image havingbrightness-related measures closest to those determined for the imagedata.
 52. A computer program according to claim 37, 38, 39 or 51characterised in that it is also arranged for derivation of a measureC-erb-2 status by: a) deriving hue and saturation for the image data ina colour space having a hue coordinate and a saturation coordinate; b)producing a segmented image by thresholding the image data on the basisof hue and saturation; and c) identifying in the segmented image groupsof contiguous pixels; and d) determining vascularity from the total areaof the groups of contiguous pixels which are sufficiently large tocorrespond to vascularity, such area being expressed as a proportion ofthe image data's total area.
 53. A computer program for use in measuringC-erb-2 status arranged to control computer apparatus to execute thesteps of: a) processing histopathological specimen image data toidentify contiguous pixel groups corresponding to respective cell nucleiassociated with surrounding cell boundary staining; characterised inthat the computer program is also arranged to implement the steps of: b)correlating window functions of different lengths with pixel sub-groupswithin the identified contiguous pixels groups to identify pixelsassociated with cell boundaries, c) computing brightness-relatedmeasures of cell boundary brightness and sharpness and brightness extentaround cell boundaries from pixels corresponding to cell boundaries, d)comparing the brightness-related measures with predetermined equivalentsobtained from comparison images associated with different values ofC-erb-2, and e) assigning to the image data a C-erb-2 value which isthat associated with the comparison image having brightness-relatedmeasures closest to those determined for the image data.
 54. A computerprogram according to claim 53 characterised in that at least some of thewindow functions have non-zero values of 6, 12, 24 and 48 pixelsrespectively and zero values elsewhere.
 55. A computer program accordingto claim 53 characterised in that pixels associated with a cell boundaryare identified from a maximum correlation with a window function, thewindow function having a length which provides an estimate of cellboundary width.
 56. A computer program according to claim 53characterised in that in step d) a brightness-related measure of cellboundary brightness and sharpness is computed using a calculationincluding dividing cell boundaries by their respective widths to providenormalised boundary magnitudes, selecting a fraction of the normalisedboundary magnitudes each greater than unselected equivalents and summingthe normalised boundary magnitudes of the selected fraction.
 57. Acomputer program according to claim 53 characterised in that in step d)a brightness-related measure of brightness extent around cell boundariesis computed using a calculation including dividing normalised boundarymagnitudes into different magnitude groups each associated with arespective range of magnitudes, providing a respective magnitude sum ofnormalised boundary magnitudes for each magnitude group, and subtractinga smaller magnitude sum from a larger magnitude sum.
 58. A computerprogram according to claim 57 characterised in that the comparison imagehaving brightness-related measures closest to those determined for theimage data is determined from a Euclidean distance between thebrightness-related measures of the comparison image and the image data.59. A computer program according to claim 53 characterised in that instep b) identifying in the image data contiguous pixel groupscorresponding to respective cell nuclei is carried out by an adaptivethresholding technique arranged to maximise the number of contiguouspixel groups identified.
 60. A computer program according to claim 59wherein the image data includes red, green and blue image planescharacterised in that the adaptive thresholding technique includes: a)generating a mean value PR and a standard deviation σ_(R) for pixels inthe red image plane, b) generating a cyan image plane from the imagedata and calculating a mean value μ_(C) for its pixels, c) calculating aproduct CMMμ_(C) where CMM is a predetermined multiplier, d) calculatinga quantity R_(B) equal to the number of adjacent linear groups of pixelsof predetermined length and including at least one cyan pixel which isless than CMMμ_(C), e) for each red pixel calculating a threshold equalto {RMMμ_(R)−σ_(R)(4−R_(B))} and RMM is a predetermined multiplier, f)forming a thresholded red image by discarding each red pixel that isgreater than or equal to the threshold, g) determining the number ofcontiguous pixel groups in the thresholded red image, h) changing thevalues of RMM and CMM and iterating steps c) to g), i) changing thevalues of RMM and CMM once more and iterating steps c) to g), j)comparing the numbers of contiguous pixel groups determined in steps g)to i), treating the three pairs of values of RMM and CMM as points in atwo dimensional space, selecting the pair of values of RMM and CMMassociated with the lowest number of contiguous pixel groups, obtainingits reflection in the line joining the other two pairs of values of RMMand CMM, using this reflection as a new pair of values of RMM and CMMand iterating steps c) to g) and this step j).
 61. A computer programaccording to claim 60 characterised in that the first three pairs of RMMand CMM values referred to in step k) are 0.802 and 1.24, 0.903 and0.903, and 1.24 and 0.802 respectively.
 62. A computer program accordingto claim 60 characterised in that that the adaptive thresholdingtechnique includes prior to step g) removing brown pixels from thethresholded red image if like-located pixels in the cyan image are lessthan CMMμ_(C).
 63. A computer program according to claim 60characterised in that the adaptive thresholding technique includes priorto step g) forming an edge-filtered cyan image, generating a standarddeviation σ_(C) for its pixels and removing edge pixels from thethresholded red image if like-located pixels in the Sobel-filtered cyanimage are greater than (μ_(C)+1.5σ_(C)).
 64. A computer programaccording to claim 60 characterised in that the adaptive thresholdingtechnique includes prior to step g) removing pixels corresponding tolipids from the thresholded red image if their red green and blue pixelvalues are all greater than the sum of the relevant colour's minimumvalue and 98% of its range of pixel values in each case.
 65. A computerprogram according to claim 60 characterised in that the adaptivethresholding technique includes prior to step g) subjecting thethresholded red image to a morphological closing operation.
 66. Acomputer program for use in measuring vascularity characterised in thatit is arranged to control computer apparatus to execute the steps of: a)using histopathological specimen image data to derive hue and saturationfor the image data in a colour space having a hue coordinate and asaturation coordinate; b) producing a segmented image by thresholdingthe image data on the basis of hue and saturation; and c) identifying inthe segmented image groups of contiguous pixels; and d) determiningvascularity from the total area of the groups of contiguous pixels whichare sufficiently large to correspond to vascularity, such area beingexpressed as a proportion of the image data's total area.
 67. A computerprogram according to claim 66 wherein the image data comprises pixelswith red, green and blue values designated R, G and B respectively,characterised in that a respective saturation value S is derived in stepb) for each pixel by: i) defining M and m for each pixel as respectivelythe maximum and minimum of R, G and B; and ii) setting S to zero if mequals zero and setting S to (M−m)/M otherwise.
 68. A computer programaccording to claim 67 characterised in that hue values designated H arederived by: a) defining new values newr, newg and newb for each pixelgiven by newr=(M−R)/(M−m), newg=(M−G)/(M−m) and newb=(M−B)/(M−m) inorder to convert each pixel value into the difference between itsmagnitude and that of the maximum of the three colour magnitudes of thatpixel, this difference being divided by the difference between themaximum and minimum of R, G and B, and b) calculating H as tabulatedimmediately below: M H 0 180 R 60(newb − newg)* G 60(2 + newr − newb)* B60(4 + newg − newr)*


69. A computer program according to claim 68 characterised in that thestep of producing a segmented image is implemented by designating forfurther processing only those pixels having both a hue H in the range282-356 and a saturation S in the range 0.2 to 0.24.
 70. A computerprogram according to claim 69 characterised in that the step ofidentifying in the segmented image groups of contiguous pixels includesthe step of spatially filtering such groups to remove groups havinginsufficient pixels to contribute to vascularity.
 71. A computer programaccording to claim 70 characterised in that the step of determiningvascularity includes treating vascularity as having a high or a lowvalue according to whether or not it is at least 31%.
 72. Apparatus formeasuring ER or PR status including means for photographinghistopathological specimens to provide image data and computer apparatusto process the image data, the computer apparatus being programmed toidentify in the image data groups of contiguous pixels corresponding torespective cell nuclei, characterised in that the computer apparatus isalso programmed to execute the steps of: a) deriving hue and saturationfor the image data in a colour space having a hue coordinate and asaturation coordinate; b) thresholding the image data on the basis ofhue and saturation and identifying pixels corresponding to cells whichare preferentially stained relative to surrounding specimen tissue; andc) determining ER or PR status from proportion of pixels correspondingto preferentially stained cells.
 73. Apparatus for measuring ER or PRstatus including means for photographing histopathological specimens toprovide image data and computer apparatus to process the image data, thecomputer apparatus being programmed to identify in the image data groupsof contiguous pixels corresponding to respective cell nuclei,characterised in that the computer apparatus is also programmed toexecute the steps of: a) deriving hue and saturation for the image datain a colour space having a hue coordinate and a saturation coordinate;b) thresholding the image data on the basis of hue and saturation andidentifying pixels corresponding to cells which are preferentiallystained relative to surrounding specimen tissue; and c) determining ERor PR status from normalised average saturation.
 74. Apparatus formeasuring ER or PR status including means for photographinghistopathological specimens to provide image data and computer apparatusto process the image data, the computer apparatus being programmed toidentify in the image data groups of contiguous pixels corresponding torespective cell nuclei, characterised in that the computer apparatus isalso programmed to execute the steps of: a) deriving hue and saturationfor the image data in a colour space having a hue coordinate and asaturation coordinate; b) thresholding the image data on the basis ofhue and saturation and identifying pixels corresponding to cells whichare preferentially stained relative to surrounding specimen tissue; andc) determining ER or PR status from normalised average saturation andfraction of pixels corresponding to preferentially stained cells. 75.Apparatus according to claim 74 characterised in that step a) isimplemented by transforming the image data into a chromaticity space,and deriving hue and saturation from image pixels and a referencecolour.
 76. Apparatus according to claim 75 characterised in that hue isobtained from an angle φ equal to$\sin^{- 1}\frac{\left| {{\overset{\sim}{x}y} - {x\overset{\sim}{y}}} \right|}{\sqrt{{\overset{\sim}{x}}^{2} + {\overset{\sim}{y}}^{2}}\sqrt{x^{2} + y^{2}}}$

and saturation from an expression$\frac{{x\quad \overset{\sim}{x}} + {y\quad \overset{\sim}{y}}}{{\overset{\sim}{x}}^{2} + {\overset{\sim}{y}}^{2}},$

where (x, y) and ({tilde over (x)}, {tilde over (y)}) are respectivelyimage pixel coordinates and reference colour coordinates in thechromaticity space.
 77. Apparatus according to claim 76 characterised inthat hue is adapted to lie in the range 0 to 90 degrees and a huethreshold of 80 degrees is set in step b).
 78. Apparatus according toclaim 74 characterised in that a saturation threshold S_(o) is set instep b), S_(O) being 0.9 for saturation in the range 0.1 to 1.9 and 0for saturation outside this range.
 79. Apparatus according to claim 74characterised in that the fraction of pixels corresponding topreferentially stained cells is determined by counting the number ofpixels having both saturation greater than a saturation threshold andhue modulus less than a hue threshold and expressing such number as afraction of a total number of pixels in the image.
 80. Apparatusaccording to claim 74 characterised in that the normalised averagesaturation is accorded a score 0, 1, 2 or 3 according respectively towhether it is (i) ≦25%, (ii) >25% and ≦50%, (iii) >50% and ≦75% or(iv) >75% and ≦100%.
 81. Apparatus according to claim 80 characterisedin that the fraction of pixels corresponding to preferentially stainedcells is accorded a score 0, 1, 2, 3, 4 or 5 according respectively towhether it is (i) 0, (ii) >0 and <0.01, (iii) ≧0.01 and ≦0.10, (iv)≧0.11 and ≦0.33, (v) ≧0.34 and ≦0.66 or (vi) ≧0.67 and ≦1.0. 82.Apparatus according to claim 81 characterised in that the scores fornormalised average saturation and fraction of pixels corresponding topreferentially stained cells are added together to provide a measurementof ER or PR.
 83. Apparatus according to claim 74 characterised in thatthe fraction of pixels corresponding to preferentially stained cells isaccorded a score 0, 1, 2, 3, 4 or 5 according respectively to whether itis (i) 0, (ii) >0 and <0.01, (iii) ≧0.01 and ≦0.10, (iv) ≧0.11 and≦0.33, (v) ≧0.34 and ≦0.66 or (vi) ≧0.67 and ≦1.0.
 84. Apparatusaccording to claim 74 characterised in that step c) is carried out byobtaining a score for normalised average saturation and a score forfraction of pixels corresponding to preferentially stained cells andadding the scores together.
 85. Apparatus according to claim 72, 73 or74 characterised in that it is also arranged to determine C-erb-2 statusand the computer apparatus is also programmed to: a) correlate windowfunctions of different lengths with pixel sub-groups within theidentified contiguous pixels groups to identify pixels associated withcell boundaries, b) compute brightness-related measures of cell boundarybrightness and sharpness and brightness extent around cell boundariesfrom pixels corresponding to cell boundaries, c) compare thebrightness-related measures with predetermined equivalents obtained fromcomparison images associated with different values of C-erb-2, and d)assign to the image data a C-erb-2 value which is that associated withthe comparison image having brightness-related measures closest to thosedetermined for the image data.
 86. Apparatus according to claim 72, 73,74 or 85 characterised in that it is also arranged to determinevascularity and the computer apparatus is also programmed to: a) derivehue and saturation for the image data in a colour space having a huecoordinate and a saturation coordinate; b) produce a segmented image bythresholding the image data on the basis of hue and saturation; c)identify in the segmented image groups of contiguous pixels; and d)determine vascularity from the total area of the groups of contiguouspixels which are sufficiently large to correspond to vascularity, sucharea being expressed as a proportion of the image data's total area. 87.Apparatus for measuring C-erb-2 status including means for photographinghistopathological specimens to provide image data and computer apparatusto process the image data, the computer apparatus being programmed toidentify in the image data groups of contiguous pixels corresponding torespective cell nuclei, characterised in that the computer apparatus isalso programmed to execute the steps of: a) correlating window functionsof different lengths with pixel sub-groups within the identifiedcontiguous pixels groups to identify pixels associated with cellboundaries, b) computing brightness-related measures of cell boundarybrightness and sharpness and brightness extent around cell boundariesfrom pixels corresponding to cell boundaries, c) comparing thebrightness-related measures with predetermined equivalents obtained fromcomparison images associated with different values of C-erb-2, and d)assigning to the image data a C-erb-2 value which is that associatedwith the comparison image having brightness-related measures closest tothose determined for the image data.
 88. Apparatus according to claim 87characterised in that at least some of the window functions havenon-zero values of 6, 12, 24 and 48 pixels respectively and zero valueselsewhere.
 89. Apparatus according to claim 87 characterised in that thecomputer apparatus is programmed to identify pixels associated with acell boundary from a maximum correlation with a window function, thewindow function having a length which provides an estimate of cellboundary width.
 90. Apparatus according to claim 87 characterised inthat the computer apparatus is programmed to execute step b) bycomputing a brightness-related measure of cell boundary brightness andsharpness using a calculation including dividing cell boundaries bytheir respective widths to provide normalised boundary magnitudes,selecting a fraction of the normalised boundary magnitudes each greaterthan unselected equivalents and summing the normalised boundarymagnitudes of the selected fraction.
 91. Apparatus according to claim 87characterised in that the computer apparatus is programmed to executestep b) by computing a brightness-related measure of brightness extentaround cell boundaries using a calculation including dividing normalisedboundary magnitudes into different magnitude groups each associated witha respective range of magnitudes, providing a respective magnitude sumof normalised boundary magnitudes for each magnitude group, andsubtracting a smaller magnitude sum from a larger magnitude sum. 92.Apparatus according to claim 91 characterised in that the computerapparatus is programmed to determine the comparison image havingbrightness-related measures closest to those determined for the imagedata from a Euclidean distance between the brightness-related measuresof the comparison image and the image data.
 93. Apparatus according toclaim 87 characterised in that the computer apparatus is programmed toidentify in the image data contiguous pixel groups corresponding torespective cell nuclei by an adaptive thresholding technique arranged tomaximise the number of contiguous pixel groups identified.
 94. Apparatusaccording to claim 93 wherein the image data includes red, green andblue image planes characterised in that the adaptive thresholdingtechnique includes: a) generating a mean value μ_(R) and a standarddeviation σ_(R) for pixels in the red image plane, b) generating a cyanimage plane from the image data and calculating a mean value μ_(C) forits pixels, c) calculating a product CMMμ_(C) where CMM is apredetermined multiplier, d) calculating a quantity R_(B) equal to thenumber of adjacent linear groups of pixels of predetermined length andincluding at least one cyan pixel which is less than CMMμ_(C), e) foreach red pixel calculating a threshold equal to{RMMμ_(R)−σ_(R)(4−R_(B))} and RMM is a predetermined multiplier, f)forming a thresholded red image by discarding each red pixel that isgreater than or equal to the threshold, g) determining the number ofcontiguous pixel groups in the thresholded red image, h) changing thevalues of RMM and CMM and iterating steps c) to g), i) changing thevalues of RMM and CMM once more and iterating steps c) to g), j)comparing the numbers of contiguous pixel groups determined in steps g)to i), treating the three pairs of values of RMM and CMM as points in atwo dimensional space, selecting the pair of values of RMM and CMMassociated with the lowest number of contiguous pixel groups, obtainingits reflection in the line joining the other two pairs of values of RMMand CMM, using this reflection as a new pair of values of RMM and CMMand iterating steps c) to g) and this step j).
 95. Apparatus accordingto claim 94 characterised in that the first three pairs of RMM and CMMvalues referred to in step k) are 0.802 and 1.24, 0.903 and 0.903, and1.24 and 0.802 respectively.
 96. Apparatus according to claim 94characterised in that the computer apparatus is programmed to removebrown pixels from the thresholded red image prior to step g) iflike-located pixels in the cyan image are less than CMMμ_(C). 97.Apparatus according to claim 94 characterised in that the computerapparatus is programmed to form an edge-filtered cyan image, generate astandard deviation σ_(C) for its pixels and remove edge pixels from thethresholded red image prior to step g) if like-located pixels in theSobel-filtered cyan image are greater than (μ_(C)+1.5σ_(C)). 98.Apparatus according to claim 94 characterised in that the computerapparatus is programmed to remove pixels corresponding to lipids fromthe thresholded red image prior to step g) if their red green and bluepixel values are all greater than the sum of the relevant colour'sminimum value and 98% of its range of pixel values in each case. 99.Apparatus according to claim 94 characterised in that the computerapparatus is programmed to subject the thresholded red image to amorphological closing operation prior to step g).
 100. Apparatus formeasuring vascularity including means for photographinghistopathological specimens to provide image data and computer apparatusto process the image data, characterised in that the computer apparatusis also programmed to execute the steps of: a) deriving hue andsaturation for the image data in a colour space having a hue coordinateand a saturation coordinate; b) producing a segmented image bythresholding the image data on the basis of hue and saturation; and c)identifying in the segmented image groups of contiguous pixels; and d)determining vascularity from the total area of the groups of contiguouspixels which are sufficiently large to correspond to vascularity, sucharea being expressed as a proportion of the image data's total area.101. Apparatus according to claim 100 wherein the image data comprisespixels with red, green and blue values designated R, G and Brespectively, characterised in that the computer apparatus is programmedto derive a respective saturation value S for each pixel in step b) by:i) defining M and m for each pixel as respectively the maximum andminimum of R, G and B; and ii) setting S to zero if m equals zero andsetting S to (M−m)/M otherwise.
 102. Apparatus according to claim 101characterised in that the computer apparatus is programmed to derive huevalues designated H by: a) defining new values newr, newg and newb foreach pixel given by newr=(M−R)/(M−m), newg=(M−G)/(M−m) andnewb=(M−B)/(M−m) in order to convert each pixel value into thedifference between its magnitude and that of the maximum of the threecolour magnitudes of that pixel, this difference being divided by thedifference between the maximum and minimum of R, G and B, and b)calculating H as tabulated immediately below: M H 0 180 R 60(newb −newg)* G 60(2 + newr − newb)* B 60(4 + newg − newr)*


103. Apparatus according to claim 102 characterised in that the computerapparatus is programmed to produce a segmented image by designating forfurther processing only those pixels having both a hue H in the range282-356 and a saturation S in the range 0.2 to 0.24.
 104. Apparatusaccording to claim 103 characterised in that the computer apparatus isprogrammed to identify in the segmented image groups of contiguouspixels by spatially filtering such groups to remove groups havinginsufficient pixels to contribute to vascularity.
 105. Apparatusaccording to claim 100 characterised in that the computer apparatus isprogrammed to determine vascularity by treating it as having a high or alow value according to whether or not it is at least 31%.